Normally the cache implementation can choose to discard the data between the write and the read when necessary (due to running out of cache space, etc.), but it is also possible for clients to lock data in the cache to support built-in grammars and other data that is explicitly provisioned by system administrators and thus must not be removed unless by explicit system administrator command.
See VXIcache.h for additional details.
This implementation currently does NOT factor in CACHE_CREATION_COST when determining how to clean up the cache, and all caching is done on disk resulting in CACHE_FLAG_LOCK_MEMORY being treated as CACHE_FLAG_LOCK. In addition, CACHE_FLAG_NONBLOCKING_IO is ignored, disk I/O is done in a blocking manner (usually undetectable by clients since local disks are used). Long key names are handled using MD5 digests as described as a potential implementation choice in VXIcache.h.
There is one cache interface per thread/line.
Functions | |
*SBCACHE_API VXIcacheResult | SBcacheInit (VXIlogInterface *log, const VXIunsigned diagLogBase, const VXIchar *cacheDir, const int cacheSizeMB, const int entryMaxSizeMB, const int entryExpTimeSec, VXIbool unlockEntries, const int cacheLowWaterMB) |
Global platform initialization of SBcache. | |
SBCACHE_API VXIcacheResult | SBcacheShutDown (VXIlogInterface *log) |
Global platform shutdown of SBcache. | |
SBCACHE_API VXIcacheResult | SBcacheCreateResource (VXIlogInterface *log, VXIcacheInterface **cache) |
Create a new cache service handle. | |
SBCACHE_API VXIcacheResult | SBcacheDestroyResource (VXIcacheInterface **cache) |
Destroy the interface and free internal resources. |
|
Create a new cache service handle.
|
|
Destroy the interface and free internal resources. Once this is called, the logging interface passed to SBcacheCreateResource( ) may be released as well.
|
|
Global platform initialization of SBcache.
|
|
Global platform shutdown of SBcache.
|