NAME

App::Toodledo::TaskCache - Manage a local cache of Toodledo tasks

SYNOPSIS

DESCRIPTION

This is neither fast nor space efficient. It uses YAML to store the tasks. This has the advantage of producing a human-readable cache but that's about the only advantage. Go ahead and send a patch for SQLite if you can. That'll facilitate selective updating of the cache.

METHODS

$boolean = $cache->exists

Return true if the cache file exists and is nonempty.

$cache->fetch

Load the cache from the file.

$cache->store

Store the cache to the file.

ATTRIBUTES

tasks

A hashref of App::Toodledo::Task objects.

last_updated

Unix time the cache was last written. Use for comparing with time of the last operation on the Toodledo server.

NOTES

Override the routine _cache_filename in this package if you want to change the filename used for the cache. It returns the concatenation of the user's home directory with the class attribute Filename (default: .toodledo_task_cache). If you just want to change the name of the file and keep it in the home directory, override the Filename attribute (declared with class_has via MooseX::ClassAttribute).

AUTHOR

Peter Scott cpan at psdt.com