NAME

Mojolicious::Plugin::CHI::chi - Interact with CHI caches

SYNOPSIS

usage: perl app.pl chi <command> [cache] [key]

  perl app.pl chi list
  perl app.pl chi purge
  perl app.pl chi clear mycache
  perl app.pl chi expire mykey
  perl app.pl chi remove mycache mykey

Interact with CHI caches associated with your application.
Valid commands include:

  list
    List all chi caches associated with your application.

  purge [cache]
    Remove all expired entries from the cache namespace.

  clear [cache]
    Remove all entries from the cache namespace.

  expire [cache] [key]
    Set the expiration date of a key to the past.
    This does not necessarily delete the data.

  remove [cache] [key]
    Remove a key from the cache

"purge" and "expire" expect a cache namespace as their only argument.
If no cache namespace is given, the default cache namespace is assumed.

"expire" and "remove" expect a cache namespace and a key name as their
arguments. If no cache namespace is given, the default cache
namespace is assumed.

DESCRIPTION

Mojolicious::Plugin::CHI::chi helps you to interact with caches associated with Mojolicious::Plugin::CHI.

ATTRIBUTES

Mojolicious::Plugin::CHI::chi inherits all attributes from Mojolicious::Command and implements the following new ones.

description

my $description = $chi->description;
$chi = $chi->description('Foo!');

Short description of this command, used for the command list.

usage

my $usage = $chi->usage;
$chi = $chi->usage('Foo!');

Usage information for this command, used for the help screen.

METHODS

Mojolicious::Plugin::CHI::chi inherits all methods from Mojolicious::Command and implements the following new ones.

run

$chi->run;

Run this command.

DEPENDENCIES

Mojolicious, CHI.

AVAILABILITY

https://github.com/Akron/Mojolicious-Plugin-CHI

COPYRIGHT AND LICENSE

Copyright (C) 2013-2016, Nils Diewald.

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

The documentation is based on Mojolicious::Command::eval, written by Sebastian Riedel.