/usr/include/wvstreams/unicachegen.h is in libwvstreams-dev 4.6.1-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | /* -*- Mode: C++ -*-
* Worldvisions Weaver Software:
* Copyright (C) 2002 Net Integration Technologies, Inc.
*
* A UniConf generator that caches keys/values in memory.
*/
#ifndef __UNICACHEGEN_H
#define __UNICACHEGEN_H
#include "unitempgen.h"
#include "uniconftree.h"
#include "wvlog.h"
/**
* A UniConf generator that adds a cache layer on top of another generator
*
* This cache implementation preloads the entire uniconf tree and then keeps up
* to date by making changes whenever notifications are received. This means
* that a read-only uniconfclient, when cached, will never actively contact
* the uniconfdaemon.
*
* **WARNING**
* The cache *will* go out of date if used with a uniconfclient/daemon without
* running a select loop.
*/
class UniCacheGen : public UniTempGen
{
protected:
WvLog log;
IUniConfGen *inner;
bool refreshed_once; //< we cache forever, so no need to re-refresh()
void loadtree(const UniConfKey &key = "");
void deltacallback(const UniConfKey &key, WvStringParm value);
public:
UniCacheGen(IUniConfGen *_inner);
virtual ~UniCacheGen();
/***** Overridden members *****/
virtual bool isok();
virtual bool refresh();
virtual void commit();
virtual void set(const UniConfKey &key, WvStringParm value);
virtual WvString get(const UniConfKey &key);
};
#endif // __UNICACHEGEN_H
|