aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/myriadcache.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2013-03-18 15:31:39 +0000
committerMike Buland <eichlan@xagasoft.com>2013-03-18 15:31:39 +0000
commit92a6325b02d2a41d7c36993f7b230302f672a4ba (patch)
tree284589448762ec002adc8ee3127342acd1bd409d /src/unstable/myriadcache.h
parent1db266b863a805d49928d831a690c39df640dc28 (diff)
downloadlibbu++-92a6325b02d2a41d7c36993f7b230302f672a4ba.tar.gz
libbu++-92a6325b02d2a41d7c36993f7b230302f672a4ba.tar.bz2
libbu++-92a6325b02d2a41d7c36993f7b230302f672a4ba.tar.xz
libbu++-92a6325b02d2a41d7c36993f7b230302f672a4ba.zip
Added the has function to the new cache system. If the object identified by
key is loaded then the query doesn't even get to the superclass.
Diffstat (limited to '')
-rw-r--r--src/unstable/myriadcache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/unstable/myriadcache.h b/src/unstable/myriadcache.h
index 7ff2183..7f83250 100644
--- a/src/unstable/myriadcache.h
+++ b/src/unstable/myriadcache.h
@@ -68,6 +68,12 @@ namespace Bu
68 } 68 }
69 69
70 protected: 70 protected:
71 virtual bool _has( const keytype &key )
72 {
73 Bu::ReadWriteMutex::ReadLocker rl( rwStore );
74 return hIndex.has( key );
75 }
76
71 virtual void _create( const obtype *o ) 77 virtual void _create( const obtype *o )
72 { 78 {
73 Bu::ReadWriteMutex::WriteLocker wl( rwStore ); 79 Bu::ReadWriteMutex::WriteLocker wl( rwStore );