source: trunk/gsdl/src/colservr/querycache.h@ 301

Last change on this file since 301 was 110, checked in by rjmcnab, 25 years ago

Moved from src/library.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.0 KB
Line 
1/**********************************************************************
2 *
3 * querycache.h --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
6 * PUT COPYRIGHT NOTICE HERE
7 *
8 * $Id: querycache.h 110 1999-01-08 09:02:22Z rjmcnab $
9 *
10 *********************************************************************/
11
12
13#ifndef QUERYCACHE_H
14#define QUERYCACHE_H
15
16
17#include "text_t.h"
18#include "queryinfo.h"
19
20class resultcacheel
21{
22public:
23 resultcacheel ();
24
25 int accessnum;
26 queryparamclass queryparameters;
27 queryresultsclass queryresults;
28};
29
30
31class querycache {
32public:
33 querycache (int themaxcachesize);
34 ~querycache ();
35
36 // returns true if the query was found in the cache
37 // if the query was found then queryresults contains
38 // the results
39 bool find (const queryparamclass &queryparams,
40 queryresultsclass &queryresults);
41
42 void cache (const queryparamclass &queryparams,
43 const queryresultsclass &queryresults);
44
45protected:
46 resultcacheel *resultcache;
47
48 int maxcachesize;
49 int nextaccessnum;
50
51 int getnextaccessnum ();
52 int getfreecachenum ();
53};
54
55
56#endif
Note: See TracBrowser for help on using the repository browser.