Skip Menu |

This queue is for tickets about the Geo-Coder-Many CPAN distribution.

Report information
The Basics
Id: 80697
Status: resolved
Priority: 0/
Queue: Geo-Coder-Many

People
Owner: Nobody in particular
Requestors: ZUMMO [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.3
Fixed in: (no value)



Subject: wrong cache usage
Storing complex structures,like hashes, should be done with ->freeze/thaw instead of ->set/get.
On Wed Nov 07 18:37:23 2012, ZUMMO wrote: Show quoted text
> Storing complex structures,like hashes, should be done > with ->freeze/thaw instead of ->set/get. >
Hi Alessandro, What module are you using for caching? The documentation of Geo::Coder::Many clearly states that whatever caching module you are using should provide get(), set() and remove() methods. It does not currently state that those methods should deal correctly with references - I will update the documentation accordingly shortly. I recommend you use the CHI module (and I will update the documentation to mention that too) as that provides get() and set() which will correctly deal with serialization of reference-based data structures. If you can provide me any other information that would be very helpful. Thanks, - Alex
Show quoted text
> What module are you using for caching?
Hi, I used Cache::File which implements Cache and Cache::Entry. Show quoted text
> methods. It does not currently state that those methods should deal > correctly with references - I will update the documentation
accordingly Show quoted text
> shortly.
I guess that would be fine. thanks.
Updated POD and also updated the check that occurs when you create an object instance with a cache object so that it croaks if the cache doesn't deal well with references. https://metacpan.org/release/Geo-Coder-Many Should be fixed in version 0.4