Simon Wistow

NAME

OurCal::Provider::Cache - a caching provider

SYNOPSIS

    [a_cache]
    type  = cache
    dir   = .cache
    child = a_provider

CONFIG OPTIONS

dir

The directory to cache into. Defaults to '.cache'

child

An optional child to cache stuff from. This will instantiate the provider and feed stuff through to it, caching appropriately.

cache_expiry

How long to cache for in seconds. Defaults to 1800 (30 mins).

METHODS

new <param[s]>

Requires an OurCal::Config object as config param and a name param.

cache <file> <subroutine>

Retrieve the cache file and returns a list of objects serialised in it.

If the cache has expired then runs the subroutine passed to fetch more data.

todos

Returns all the todos on the system.

has_events <param[s]>

Returns whether there are events given the params.

events <param[s]>

Returns all the events for the given params.

users

Returns the name of all the users on the system.

save_todo <OurCal::Todo>

Save a todo.

del_todo <OurCal::Todo>

Delete a todo.

save_event <OurCal::Event>

Save an event.

del_event <OurCal::Event>

Delete an event..