API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IRAMCACHE_SETMAXSIZE()

Brew Release
Brew MP 1.0.2
See Also
None
Description
This function sets the maximum size (in bytes) that the RamCache may consume to hold keys and values
Params
piRamCache
[]:
the IRamCache interface pointer
nSize
[]:
the new size, in bytes
Interface
Prototype
  •    int IRamCache_SetMaxSize(IRamCache* piRamCache, int nSize);
    
Return
  • the old max size
Side Effect
  • the RamCache adjusts to its new constraint, least-recently-used entries and expired entries are removed from the RamCache
Comments
the overhead of storing the keys and values is not included in this number, this number restricts only key and value bytes are counted Note: if a newly added record would exceed the cache's size constraint (by itself), the cache will be cleared.