summaryrefslogtreecommitdiff
path: root/src/tests/cache.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-02-24 01:23:11 +0000
committerMike Buland <eichlan@xagasoft.com>2009-02-24 01:23:11 +0000
commit88b3a5acf78aa9a2d73f2462e45988f5afb9d2c5 (patch)
tree8544b797ed76f9ffe79d4ccce6f9b4ffcf69889f /src/tests/cache.cpp
parentef2935347099967cc7092fa7f472d91d51571468 (diff)
downloadlibbu++-88b3a5acf78aa9a2d73f2462e45988f5afb9d2c5.tar.gz
libbu++-88b3a5acf78aa9a2d73f2462e45988f5afb9d2c5.tar.bz2
libbu++-88b3a5acf78aa9a2d73f2462e45988f5afb9d2c5.tar.xz
libbu++-88b3a5acf78aa9a2d73f2462e45988f5afb9d2c5.zip
Woot, the cache system now supports intellegent sync'ing. It will ask the cache
about each object that it has and weather or not to sync it. This will probably be made optional in the future.
Diffstat (limited to 'src/tests/cache.cpp')
-rw-r--r--src/tests/cache.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/cache.cpp b/src/tests/cache.cpp
index 323edda..8d95a9d 100644
--- a/src/tests/cache.cpp
+++ b/src/tests/cache.cpp
@@ -96,6 +96,19 @@ public:
96 f.write( s ); 96 f.write( s );
97 } 97 }
98 98
99 virtual void sync( Bob *, const long & )
100 {
101 }
102
103 virtual void sync()
104 {
105 }
106
107 virtual bool has( const long & )
108 {
109 return true;
110 }
111
99 virtual Bob *load( const long &key ) 112 virtual Bob *load( const long &key )
100 { 113 {
101 TRACE( key ); 114 TRACE( key );
@@ -156,6 +169,10 @@ public:
156 { 169 {
157 } 170 }
158 171
172 virtual bool shouldSync( Bob *, const long &, time_t )
173 {
174 }
175
159private: 176private:
160 177
161}; 178};