source: trunk/gsdl/src/library/querycache.h@ 4

Last change on this file since 4 was 4, checked in by sjboddie, 25 years ago

Initial revision

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 820 bytes
Line 
1#ifndef QUERYCACHE_H
2#define QUERYCACHE_H
3
4#include "text_t.h"
5#include "queryinfo.h"
6
7class resultcacheel
8{
9public:
10 resultcacheel ();
11
12 int accessnum;
13 queryparamclass queryparameters;
14 queryresultsclass queryresults;
15};
16
17
18class querycache {
19public:
20 querycache (int themaxcachesize);
21 ~querycache ();
22
23 // returns true if the query was found in the cache
24 // if the query was found then queryresults contains
25 // the results
26 bool find (const queryparamclass &queryparams,
27 queryresultsclass &queryresults);
28
29 void cache (const queryparamclass &queryparams,
30 const queryresultsclass &queryresults);
31
32protected:
33 resultcacheel *resultcache;
34
35 int maxcachesize;
36 int nextaccessnum;
37
38 int getnextaccessnum ();
39 int getfreecachenum ();
40};
41
42
43
44#endif
Note: See TracBrowser for help on using the repository browser.