diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-02-11 14:05:38 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-02-11 14:05:38 +0100 |
commit | 36b942a6982578af33ca26a5306ebd7012f2329b (patch) | |
tree | 33457580ea08116d4a105a728eba44d96ed087da /src/cache.hpp | |
parent | dc93523204ebe8562145997673f25f8e59f9d2f5 (diff) |
Added an option to remove items from the caches, optionally by a subset of 2 specific key-values only
Diffstat (limited to 'src/cache.hpp')
-rw-r--r-- | src/cache.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cache.hpp b/src/cache.hpp index c3675f07..f3685b03 100644 --- a/src/cache.hpp +++ b/src/cache.hpp @@ -42,6 +42,10 @@ public: void Store(Key &&key, Value &&value); void Invalidate(); + // Removes all entries with a given key + void Remove(const Key &key); + template <int I1, int I2> void RemoveBySubset(const Key key); // currently only supports 2 indices + static Cache<Key, Value> &Instance(); private: @@ -72,7 +76,6 @@ typedef Cache<BinaryKey, std::string> BinaryCache; extern template class Cache<BinaryKey, std::string>; extern template std::string BinaryCache::Get(const BinaryKeyRef &, bool *) const; - // ================================================================================================= // The key struct for the cache of compiled OpenCL programs (context-dependent) |