Log inRegister

PerlDoc

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

internal package Foswiki::Contrib::DBCacheContrib::Archivist

This is an abstract base class defining the interface to a DBCacheContrib archivist. An archivist handles the mechanics of storage of data on disc. It serves up maps and arrays that obey the Foswiki::Contrib::DBCacheContrib::Array and Foswiki::Contrib::DBCacheContrib::Map interfaces.

NOTE: this is a pure virtual base class, and cannot be instantiated on its own.

ObjectMethod newArray() → $array

Construct a new Foswiki::Contrib::DBCacheContrib::Map in the DB. See the documentation of Foswiki::Contrib::DBCacheContrib::Map for information on how to tie this to a perl hash.

ObjectMethod newArray() → $array

Construct a new Foswiki::Contrib::DBCacheContrib::Array in the DB. See the documentation of Foswiki::Contrib::DBCacheContrib::Array for information on how to tie this to a perl array.

ObjectMethod sync()

Sync data changes to disc. Some archivist implementations may cache data changes in memory. A call to this method ensures that the DB on disc is synchronised with that memory representation.

ObjectMethod getRoot() → $map

Return the DB root map. The root of the DB is always of type Foswiki::Contrib::DBCacheContrib::Map, under which you can create keys that point to maps or arrays.

ObjectMethod clear()

Completely clear down the DB; removes all data and creates a new root. Intended primarily for use in testing.

ObjectMethod isModified()

Checks whether the cache needs to be reloaded from disk in case it changed by some other process.

ObjectMethod updateCacheTime()

sets the timestamp of the cache being modified