Make *LRUCache constructor data types match LRUStrategy constructor. #1328

This commit is contained in:
Alex Fabijanic 2017-10-06 19:27:35 -05:00
parent e0a5ebc06e
commit 0a58a30c1b
4 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ class AccessExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollectio
/// but also limits the size of the cache (per default: 1024). /// but also limits the size of the cache (per default: 1024).
{ {
public: public:
AccessExpireLRUCache(long cacheSize = 1024, Timestamp::TimeDiff expire = 600000): AccessExpireLRUCache(std::size_t cacheSize = 1024, Timestamp::TimeDiff expire = 600000):
AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex >(StrategyCollection<TKey, TValue>()) AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex >(StrategyCollection<TKey, TValue>())
{ {
this->_strategy.pushBack(new LRUStrategy<TKey, TValue>(cacheSize)); this->_strategy.pushBack(new LRUStrategy<TKey, TValue>(cacheSize));

View File

@ -39,7 +39,7 @@ class ExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollection<TKey
/// but also limits the size of the cache (per default: 1024). /// but also limits the size of the cache (per default: 1024).
{ {
public: public:
ExpireLRUCache(long cacheSize = 1024, Timestamp::TimeDiff expire = 600000): ExpireLRUCache(std::size_t cacheSize = 1024, Timestamp::TimeDiff expire = 600000):
AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex>(StrategyCollection<TKey, TValue>()) AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex>(StrategyCollection<TKey, TValue>())
{ {
this->_strategy.pushBack(new LRUStrategy<TKey, TValue>(cacheSize)); this->_strategy.pushBack(new LRUStrategy<TKey, TValue>(cacheSize));

View File

@ -35,7 +35,7 @@ class LRUCache: public AbstractCache<TKey, TValue, LRUStrategy<TKey, TValue>, TM
/// An LRUCache implements Least Recently Used caching. The default size for a cache is 1024 entries. /// An LRUCache implements Least Recently Used caching. The default size for a cache is 1024 entries.
{ {
public: public:
LRUCache(long size = 1024): LRUCache(std::size_t size = 1024):
AbstractCache<TKey, TValue, LRUStrategy<TKey, TValue>, TMutex, TEventMutex>(LRUStrategy<TKey, TValue>(size)) AbstractCache<TKey, TValue, LRUStrategy<TKey, TValue>, TMutex, TEventMutex>(LRUStrategy<TKey, TValue>(size))
{ {
} }

View File

@ -47,7 +47,7 @@ class UniqueExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollectio
/// method to values that do not have a getExpiration function. /// method to values that do not have a getExpiration function.
{ {
public: public:
UniqueExpireLRUCache(long cacheSize = 1024): UniqueExpireLRUCache(std::size_t cacheSize = 1024):
AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex>(StrategyCollection<TKey, TValue>()) AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex>(StrategyCollection<TKey, TValue>())
{ {
this->_strategy.pushBack(new LRUStrategy<TKey, TValue>(cacheSize)); this->_strategy.pushBack(new LRUStrategy<TKey, TValue>(cacheSize));