- REQUIRED ARGUMENTS
- OPTIONAL ARGUMENTS
- AUTHORS AND LICENSE
Starch::Store - Base role for Starch stores.
This role defines an interfaces for Starch store classes. Starch store classes are meant to be thin wrappers around the store implementations (such as DBI, CHI, etc).
See "STORES" in Starch::Manual for instructions on using stores and a list of available Starch stores.
See "STORES" in Starch::Extending for instructions on writing your own stores.
This role adds support for method proxies to consuming classes as described in "METHOD PROXIES" in Starch::Manual.
The Starch::Manager object which is used by stores to access configuration and create sub-stores (such as the Layered store's outer and inner stores). This is automatically set when the stores are built by Starch::Factory.
Set the per-store maximum expires which will override the state's expires if the state's expires is larger.
Used by "stringify_key" to combine the state namespace and ID. Defaults to
Return true if the stores supports the "reap_expired" method.
Returns "short_class_name" in Starch::Role::Log with the
Store:: prefix remove.
Builds a new store object. Any arguments passed will be combined with the "sub_store_args".
Returns the arguments needed to create a sub-store. Any arguments passed will be combined with the default arguments. The default arguments will be "manager" and "max_expires" (if set). More arguments may be present if any plugins extend this method.
Given an expires value this will calculate the expires that this store should use considering what "max_expires" is set to.
my $store_key = $starch->stringify_key( $state_id, \@namespace, );
This method is used by stores that store and lookup data by a string (all of them at this time). It combines the state ID with the "namespace" of the key data for the store request.
This triggers the store to find and delete all expired states. This is meant to be used in an offline process, such as a cronjob, as finding and deleting the states could take hours depending on the amount of data and the storage engine's speed.
By default this method will throw an exception if the store does not define its own reap method. You can check if a store supports this method by calling "can_reap_expired".