Skip Menu |

This queue is for tickets about the Data-Throttler CPAN distribution.

Report information
The Basics
Id: 66183
Status: resolved
Priority: 0/
Queue: Data-Throttler

People
Owner: Nobody in particular
Requestors: njh [...] bandsman.co.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.05
Fixed in: (no value)



In addition to (or perhaps instead of) the backend and backend_options arguments, how about allowing the passing of a CHI object to new, e.g.: use CHI; use Data::Throttler: my $cache = (CHI->new(driver => 'File')); my $throttler = Data::Throttler->new( max_items => 100, interval => 3600, cache => $cache, );
On Fri Feb 25 17:04:58 2011, njh@bandsman.co.uk wrote: Show quoted text
> In addition to (or perhaps instead of) the backend and backend_options > arguments, how about allowing the passing of a CHI object to new
This is an interesting thought, do you have a specific use case in mind? The way persistence is currently implemented is that the throttler loads the deeply structured data into memory from the backend (which in turn can be memory or a yaml file) in one fell swoop, operates on it, and then saves the modified data structure back to the backend in its entirety. Using CHI as a generic cache interface would make sense if we changed that behavior to operate on the cache instead of the data structure. This would require significant changes, which is why I'm interested if you've seen issues (performance or other) that would justify the change. Also, patches are of course always welcome ;).
Closed due to inactivity.