Six Apart Code

<<

NAME

MT::Session - temporary storage of arbitrary data.

SYNOPSIS

Provides for the storage of arbitrary temporary data. The name "session" is a hold-over from the days when commenter sessions were the only kind of temporary data that MT stored.

A piece of temporary data is identified uniquely by an ID, but it also has a "kind," a two-character identifier that separates different usages of the table. The id value must be distinct across all kinds.

Each kind is associated with a fixed timeout window; records older than that amount are deleted automatically. Currently-used kinds are as follows:

SI

Active commenter sessions are held in SI sessions.

KY

The public key of the remote comment authentication service is held in the single record of kind 'KY'.

AN

"Nonce" values (used for certain authentication systems) are stored with a kind of 'AN'.

US

Active user sessions are held in 'US' records.

NW

The cached contents of the newsbox (top right of MT's welcome screen) is held in the single record of kind 'NW'.

METHODS

$sess = MT::Session->get_unexpired_value($timeout, [ $terms, [ $args, ... ] ]);

Fetches the specified session record, if it is current (its start field falls within last $timeout seconds). Arguments following the $timeout argument are passed directly to MT::Object::load.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 135:

You forgot a '=back' before '=head1'

<<

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