From 1dcc1b1fc9fd35d959255452c8b5be1269ca4f44 Mon Sep 17 00:00:00 2001 From: zecke Date: Thu, 10 Oct 2002 17:08:58 +0000 Subject: The Cache is finally in place I tested it with my todolist and it 'works' for 10.000 todos the hits are awesome ;) The read ahead functionality does not make sense for XMLs backends because most of the stuff is already in memory. While using readahead on SQL makes things a lot faster.... I still have to fully implement read ahead This change is bic but sc --- (limited to 'libopie/pim/otemplatebase.h') diff --git a/libopie/pim/otemplatebase.h b/libopie/pim/otemplatebase.h index f71417b..b855919 100644 --- a/libopie/pim/otemplatebase.h +++ b/libopie/pim/otemplatebase.h @@ -1,6 +1,8 @@ #ifndef OPIE_TEMPLATE_BASE_H #define OPIE_TEMPLATE_BASE_H +#include + #include "opimrecord.h" /** @@ -9,12 +11,21 @@ template class OTemplateBase { public: + enum CacheDirection { Forward=0, Reverse }; OTemplateBase() { }; virtual ~OTemplateBase() { } virtual T find( int uid )const = 0; + /** + * read ahead find + */ + virtual T find( int uid, const QArray& items, + uint current, CacheDirection dir = Forward )const = 0; + virtual void cache( const T& )const = 0; + virtual void setSaneCacheSize( int ) = 0; + }; -- cgit v0.9.0.2