| MemoryCache | R Documentation |
In-memory LRU cache with TTL support
Ultra-low latency, limited by available RAM. Best for hot data, session data, frequently accessed vectors.
VectrixDB::BaseCache -> MemoryCache
new()Create a new MemoryCache
MemoryCache$new(config = NULL)
configCacheConfig object
get()Get value from cache
MemoryCache$get(key)
keyCache key
Value or NULL
set()Set value in cache
MemoryCache$set(key, value, ttl = NULL)
keyCache key
valueValue to cache
ttlTime to live
delete()Delete key from cache
MemoryCache$delete(key)
keyCache key
Logical success
exists()Check if key exists
MemoryCache$exists(key)
keyCache key
Logical
clear()Clear cache
MemoryCache$clear()
size()Get cache size
MemoryCache$size()
Integer
cleanup_expired()Cleanup expired entries
MemoryCache$cleanup_expired()
Integer count removed
clone()The objects of this class are cloneable with this method.
MemoryCache$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.