
moseley at hank
May 20, 2009, 5:42 PM
Post #1 of 2
(346 views)
Permalink
|
|
Plugin::Cache silent failures
|
|
sub cache_set { my ( $c, $key, $value, %meta ) = @_; $c->choose_cache_backend_wrapper( key => $key, value => $value, %meta ) ->set( $key, $value, exists $meta{expires} ? $meta{expires} : () ); } Unfortunately, Cache::Entry doesn't really specify a return value for set(), but common backends like Memcached and FastMmap do seem to return a value indicating success. Not sure if there are other commonly used backends that would not have a meaningful return value. The plugin doesn't define the return from cache_set, either. As it is now, cache_set can silently fail. I wonder if it would be safe to warn on ->set() failing in the plugin. -- Bill Moseley moseley[at]hank.org Sent from my iMutt _______________________________________________ List: Catalyst[at]lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
|