A generic abstract cache for sets of objects. This can be used by subclasses to implement caching of homogeneous sets of objects.
Subclasses simply have to implement serialisation and deserialisation of the objects to and from GLib.Variants.
It's intended that this class be used for providing caching layers for
PersonaStores, for example.
Deserialise the given variant to a new instance of an
object. The variant is guaranteed to have the type returned by
ObjectCache.get_serialised_object_type.
Get the version of the variant type returned by
ObjectCache.get_serialised_object_type. This
must be incremented every time the variant type changes so that old cache files aren't misinterpreted.
Load a set of objects from the cache and return them as a new set. If
the cache file doesn't exist, null will be returned. An empty set will be returned if the cache file existed but was
empty (i.e. was stored with an empty set originally).
Serialise the given object to a
GLib.Variant and return the variant. The variant must be of the type returned by
ObjectCache.get_serialised_object_type.
Store a set of objects to the cache file, overwriting any existing set
of objects in the cache, or creating the cache file from scratch if it didn't previously exist.
Inherited Members:
All known members inherited from class GLib.Object