|
luna engine
software engine
|
a pretty optimal multithreaded vector cahce headeronly class. More...
#include <vectorCache.h>


Public Member Functions | |
| vectorCache () | |
| creates vectorCache with default cache size is of 200 More... | |
| vectorCache (size_t maxCacheSize) | |
| creates vectorcache with defined size (recommended to have size less then 1000 objects. More... | |
| ~vectorCache () | |
| destroys/deletes the cache :). More... | |
| std::pair< cacheObject, value > | putValue (cacheObject *key, value _value) |
| returns a object in a vector cache using a key handle. More... | |
| std::pair< cacheResult, value > | getValue (cacheObject key) |
| gets a stored cahe value using the key handle. More... | |
| std::pair< cacheResult, value > | setValue (cacheObject key, value _value) |
| sets the current value of the given cacheObject key. More... | |
| std::pair< cacheResult, value > | eraseValue (cacheObject key) |
| erases value of the given key. More... | |
Protected Attributes | |
| uint64_t | maxCacheSize |
| std::vector< uint64_t > | handleCache |
| std::vector< value > | valueCache |
| std::mutex | lockGuard |
a pretty optimal multithreaded vector cahce headeronly class.
|
inline |
creates vectorCache with default cache size is of 200
|
inline |
creates vectorcache with defined size (recommended to have size less then 1000 objects.
| maxCacheSize |
|
inline |
destroys/deletes the cache :).
|
inline |
erases value of the given key.
| cacheObject | key |
| value | _value |
|
inline |
gets a stored cahe value using the key handle.
| key |
|
inline |
returns a object in a vector cache using a key handle.
| key | a handle to the cahce object |
| _value | the cache object to store |
|
inline |
sets the current value of the given cacheObject key.
| cacheObject | key the key to overwite |
| _value | the value to overwrite the current value |
|
protected |
|
mutableprotected |
|
protected |
|
protected |