Skip to content

Latest commit

 

History

History
494 lines (334 loc) · 9.06 KB

API.md

File metadata and controls

494 lines (334 loc) · 9.06 KB

Classes

LRU

LRU Cache

Memcache

Memcache cache

File

File cache

Mysql

Mysql cache

Redis

Redis cache

Mongodb

Mongodb cache

LRU

LRU Cache

Kind: global class

lrU.destory()

lru reset

Kind: instance method of LRU

lrU.delete(key)

delete cache

Kind: instance method of LRU

Param Description
key cache key

lrU.clean(key)

clean cache by key prefix

Kind: instance method of LRU

Param Description
key cache key prefix

lrU.read(key)

read cache

Kind: instance method of LRU

Param Description
key read key

lrU.search(key)

seach cache by key

Kind: instance method of LRU

Param Description
key search key

lrU.write(key, value)

write the cache

Kind: instance method of LRU

Param Description
key cache key
value cache value

Memcache

Memcache cache

Kind: global class

memcache.delete(key)

delete cache

Kind: instance method of Memcache

Param Description
key cache key

memcache.clean(prefix)

clean cache by key prefix

Kind: instance method of Memcache

Param Description
prefix cache key prefix

memcache.read(key, forcecache)

read the cache

Kind: instance method of Memcache

Param Default Description
key cache key
forcecache true use force cache, default true

memcache.search(key)

seach cache by key

Kind: instance method of Memcache

Param Description
key search key

memcache.write(key, data, ttl)

write the cache

Kind: instance method of Memcache

Param Description
key cache key
data cache value
ttl ttl

File

File cache

Kind: global class

file.delete(key)

delete cache

Kind: instance method of File

Param Description
key cache key

file.clean(dir)

clean cache

Kind: instance method of File

Param Description
dir cache dir

file.read(key)

read cache

Kind: instance method of File

Param Description
key read key

file.search(key)

seach cache alias read

Kind: instance method of File

Param Description
key search key

file.write(key, value)

write the cache

Kind: instance method of File

Param Description
key cache key
value cache value

Mysql

Mysql cache

Kind: global class

mysql.destory()

destory mysql instance

Kind: instance method of Mysql

mysql.init()

init database

Kind: instance method of Mysql

mysql.read(key)

read cache by key

Kind: instance method of Mysql

Param Description
key the cache key

mysql.search(prefix)

seach cache by key prefix

Kind: instance method of Mysql

Param Description
prefix key prefix

mysql.write(key, data, expire)

write the cache

Kind: instance method of Mysql

Param Default Description
key cache key
data cache value
expire 0 expire date

mysql.delete(key)

delete cache

Kind: instance method of Mysql

Param Description
key cache key

mysql.clean(prefix)

clean cache by key prefix

Kind: instance method of Mysql

Param Description
prefix cache key prefix

Redis

Redis cache

Kind: global class

redis.destory()

redis quit

Kind: instance method of Redis

redis.delete(key)

delete cache

Kind: instance method of Redis

Param Description
key cache key

redis.clean(key)

clean cache by key prefix

Kind: instance method of Redis

Param Description
key cache key prefix

redis.read(key)

read cache

Kind: instance method of Redis

Param Description
key read key

redis.search(key)

seach cache by key

Kind: instance method of Redis

Param Description
key search key

redis.write(key, data, ttl)

write the cache

Kind: instance method of Redis

Param Description
key cache key
data cache value
ttl cache expire time

Mongodb

Mongodb cache

Kind: global class

mongodb.destory()

mongodb close

Kind: instance method of Mongodb

mongodb.init(options)

mongodb init, createCollection etc.

Kind: instance method of Mongodb

Param Description
options constructor options

mongodb.delete(key)

delete cache

Kind: instance method of Mongodb

Param Description
key cache key

mongodb.clean(key)

clean cache by key prefix

Kind: instance method of Mongodb

Param Description
key cache key prefix

mongodb.read(key)

read cache

Kind: instance method of Mongodb

Param Description
key read key

mongodb.search(key)

seach cache by key

Kind: instance method of Mongodb

Param Description
key search key

mongodb.write(key, value)

write the cache

Kind: instance method of Mongodb

Param Description
key cache key
value cache value