diff options
Diffstat (limited to 'src/unstable/cachebase.h')
-rw-r--r-- | src/unstable/cachebase.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/unstable/cachebase.h b/src/unstable/cachebase.h index 807adf0..026e69b 100644 --- a/src/unstable/cachebase.h +++ b/src/unstable/cachebase.h | |||
@@ -350,6 +350,16 @@ namespace Bu | |||
350 | ); | 350 | ); |
351 | } | 351 | } |
352 | 352 | ||
353 | bool has( const keytype &key ) | ||
354 | { | ||
355 | Bu::ReadWriteMutex::ReadLocker rl( mCacheEntry ); | ||
356 | |||
357 | if( hCacheEntry.has( key ) ) | ||
358 | return true; | ||
359 | |||
360 | return _has( key ); | ||
361 | } | ||
362 | |||
353 | CachePtr<keytype, obtype> get( const keytype &key ) | 363 | CachePtr<keytype, obtype> get( const keytype &key ) |
354 | { | 364 | { |
355 | Entry *pEnt = getEntry( key ); | 365 | Entry *pEnt = getEntry( key ); |
@@ -431,6 +441,7 @@ namespace Bu | |||
431 | } | 441 | } |
432 | 442 | ||
433 | protected: | 443 | protected: |
444 | virtual bool _has( const keytype &key )=0; | ||
434 | virtual void _create( const obtype *o )=0; | 445 | virtual void _create( const obtype *o )=0; |
435 | virtual void _erase( const keytype &k )=0; | 446 | virtual void _erase( const keytype &k )=0; |
436 | 447 | ||