aboutsummaryrefslogtreecommitdiff
path: root/src/cachestore.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-12-03 17:05:26 +0000
committerMike Buland <eichlan@xagasoft.com>2008-12-03 17:05:26 +0000
commit0bd8b8cf19687229b53e37468dfe36c4217fbbf1 (patch)
tree9597c83c6770473b7dc43b6917a8787f0d4c87c6 /src/cachestore.h
parent6f3b85c5af1855e1695885fb28220c34f6a0673f (diff)
downloadlibbu++-0bd8b8cf19687229b53e37468dfe36c4217fbbf1.tar.gz
libbu++-0bd8b8cf19687229b53e37468dfe36c4217fbbf1.tar.bz2
libbu++-0bd8b8cf19687229b53e37468dfe36c4217fbbf1.tar.xz
libbu++-0bd8b8cf19687229b53e37468dfe36c4217fbbf1.zip
Alright, the caching system now passes the basic CRUD tests with arbitrary
keytypes. It doesn't yet use the stackable CacheStore concept, but the code is all in place to make it easy to switch to. There also needs to be some more accounting code in place, so that we can actually use the Schedulers, whatever they happen to be called in the future. A whacky side note, it turns out that we totally need to ensure an object is loaded from the cache in order to delete it, we can't ensure that any references to other objects that are in the cache will be loaded otherwise.
Diffstat (limited to 'src/cachestore.h')
-rw-r--r--src/cachestore.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cachestore.h b/src/cachestore.h
index 3211b6a..5b52359 100644
--- a/src/cachestore.h
+++ b/src/cachestore.h
@@ -1,8 +1,6 @@
1#ifndef BU_CACHE_STORE_H 1#ifndef BU_CACHE_STORE_H
2#define BU_CACHE_STORE_H 2#define BU_CACHE_STORE_H
3 3
4#include "bu/cptr.h"
5
6namespace Bu 4namespace Bu
7{ 5{
8 /** 6 /**
@@ -21,10 +19,8 @@ namespace Bu
21 { 19 {
22 } 20 }
23 21
24 typedef Bu::CPtr<obtype, keytype> Ptr;
25
26 virtual obtype *load( const keytype &key )=0; 22 virtual obtype *load( const keytype &key )=0;
27 virtual void unload( obtype *pObj )=0; 23 virtual void unload( obtype *pObj, const keytype &key )=0;
28 virtual keytype create( obtype *pSrc )=0; 24 virtual keytype create( obtype *pSrc )=0;
29 virtual void destroy( obtype *pObj, const keytype &key )=0; 25 virtual void destroy( obtype *pObj, const keytype &key )=0;
30 26