util

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOnlyRead

func IsOnlyRead(sql string) bool

IsOnlyRead parse sql is only read

Types

type LRUCache

type LRUCache struct {
	// contains filtered or unexported fields
}

func NewLRUCache

func NewLRUCache(capacity int) *LRUCache

NewLRUCache create a lruCache with input capacity

func (*LRUCache) Get

func (c *LRUCache) Get(key int64) int

Get if key not exist, return -1

func (*LRUCache) Put

func (c *LRUCache) Put(key int64, value int)

Put store key-val in lruCache

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL