[Catalyst] Cache::FastMmap
and Catalyst::Plugin::Cache::Store::FastMmap
Ash Berlin
ash_cpan at firemirror.com
Tue Oct 16 23:09:06 GMT 2007
Bill Moseley wrote:
> Should Catalyst::Plugin::Cache::Store::FastMmap be un-deprecated?
>
> http://search.cpan.org/~nuffin/Catalyst-Plugin-Cache-Store-FastMmap-0.02/lib/Catalyst/Plugin/Cache/Store/FastMmap.pm
>
> This plugin is deprecated because Cache::FastMmap no longer needs
> to be wrapped to store plain values. It is still available on the
> CPAN for backwards compatibility and will still work with newer
> versions of Cache::FastMmap with a slight performance degredation.
>
> I'm not exactly sure what the issue was, but I was not able to use
> Cache::FastMmap as a "class" backend.
>
> I believe one issue had to do with storing scalars. That was fixed in
> Cache::FastMmap Oct 2006 in version 1.13.
>
> A still-existing problem was that Catalyst passes a hash reference of
> options to the cache's new() method. Cache::FastMmap only accepted a
> list of arguments so that would generate:
>
> Reference found where even-sized list expected at
> /usr/local/lib/perl/5.8.8/Cache/FastMmap.pm
>
> Rob fixed that in Cache::FastMmap yesterday in version 1.21.
>
> Now, there still seems to be a remaining issue that the Cache plugin
> passes a third argument (expires value) to the cache's set() method. But,
> Cache::FastMmap expects a hash (list) of arguments
>
> =item I<set($Key, $Value, [ \%Options ])>
>
> Store specified key/value pair into cache
>
> I<%Options> is optional, and is used by get_and_set() to control
> the locking behaviour. For now, you should probably ignore it
> unless you read the code to understand how it works
>
>
> I'm not clear on the goals, but seems either FastMmap needs to be
> updated again (which doesn't seem possible) or
> Catalyst::Plugin::Cache::Store::FastMmap needs to remove the
> DEPRECATED statement since it seems required to work with
> Cache::FastMmap.
>
>
>
WTF is it with authors of modules in the Cache:: namespace that don't
respect the Cache API?
First port of call is to email him and ask him if it was a conscience
decision or if is unknown.
Since Cache::FastMmap doesn't do expiry - it should just ignore that
expiry value if its single value instead of a hash ref.
More information about the Catalyst
mailing list