stasis-aries-wal/lladd/pageCache.h
Sears Russell af152bd08e Logwriter can now handler partial log entries correctly (it ignores them)
Buffer Mananger no longer steals pages pre-maturely
Alloc is an operation, and correct.
Caching broken out into a new module
Wrote a utility to translate a log file into human-readable ascii.
2004-06-30 01:09:57 +00:00

24 lines
773 B
C

#ifndef __PAGECACHE_H
#define __PAGECACHE_H
/**
Implements lladd's caching policy. Looks up pageid in the cache.
If pageid doesn't exist, then allocate a new slot for it. If
there are no new slots, then callback into bufferManager's
pageRead() function. Eventually, this could be extended to
support application specific caching schemes.
Currently, LLADD uses LRU-2S from Markatos "On Caching Searching
Engine Results"
If you would like to implement your own caching policy, implement
the three functions below. They are relatively straightforward.
Note that pageCache does not perform any file I/O of its own.
*/
#include <lladd/page.h>
void pageCacheInit();
void pageCacheDeinit();
Page * loadPagePtr(int pageid);
#endif