Template Struct store

Inheritance Relationships

Base Types

Struct Documentation

template<template<typename, typename> class StorageT, typename KeyT, typename ...T>
struct udho::cache::store : private udho::cache::engine<StorageT<KeyT, void>>, private udho::cache::engine<StorageT<KeyT, T>>, protected udho::cache::master<KeyT>, public udho::cache::registry<KeyT, T>

A type safe non-copiable storage

user u("Neel");
appearence a("red");
udho::cache::store<std::string, user, appearence> store;
store.insert("x", u);
store.insert("x", a);
store.exists<user>();

Public Types

typedef KeyT key_type
typedef master<KeyT> master_type
typedef shadow<KeyT, T...> shadow_type
typedef store<StorageT, KeyT, T...> self_type
typedef engine<StorageT<KeyT, void>>::config_type config_type

Public Functions

store(const config_type &config)
store(const self_type&) = delete
template<typename V>
bool exists(const key_type &key) const
template<typename V>
V get(const key_type &key, const V &def = V()) const
template<typename V>
V at(const key_type &key)
template<typename V>
void insert(const key_type &key, const V &value)
template<typename V>
std::size_t size(const key_type &key) const
template<typename V>
bool remove(const key_type &key)
boost::posix_time::ptime created(const key_type &key) const
boost::posix_time::ptime updated(const key_type &key) const
boost::posix_time::time_duration age(const key_type &key) const
boost::posix_time::time_duration idle(const key_type &key) const

Friends

friend struct shadow< KeyT, T… >