Six Apart Code

<<

NAME

MT::Request - Movable Type request cache

SYNOPSIS

    use MT::Request;
    my $r = MT::Request->instance;
    $r->cache('foo', $foo);

    ## Later and elsewhere...
    my $foo = $r->cache('foo');

DESCRIPTION

MT::Request is a very simple singleton object which lasts only for one particular request to the application, and thus can be used for caching data that you would like to disappear after the application request exists (and not for the lifetime of the application).

USAGE

MT::Request->instance

Returns the MT::Request singleton.

$r->cache($key [, $value ])

Given a key $key, returns the cached value of the key in the cache held by the object $r. Given a value $value and a key $key, sets the value of the key $key in the cache. $value can be a simple scalar, a reference, an object, etc.

$r->stash($key [, $value ])

stash is an alias to cache.

AUTHOR & COPYRIGHT

Please see the MT manpage for author, copyright, and license information.

<<

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.