Re: Implementing a cache

2009-07-12 Thread skip
>> My Cache module does #1 and #3.  I'm not sure if you want #2 for >> internal cache maintenance or for as part of the API. >> >>    http://www.smontanaro.net/python/Cache.py pdpi> I'm not sure whether #2 is doable at all, as written. You _need_ a pdpi> complete history

Re: Implementing a cache

2009-07-12 Thread pdpi
On Jul 12, 2:01 pm, s...@pobox.com wrote: >     Nikolaus> I want to implement a caching data structure in Python that >     Nikolaus> allows me to: > >     Nikolaus>  1. Quickly look up objects using a key >     Nikolaus>  2. Keep track of the order in which the objects are accessed >     Nikolaus>

Re: Implementing a cache

2009-07-12 Thread skip
Nikolaus> I want to implement a caching data structure in Python that Nikolaus> allows me to: Nikolaus> 1. Quickly look up objects using a key Nikolaus> 2. Keep track of the order in which the objects are accessed Nikolaus> (most recently and least recently accessed one,

Re: Implementing a cache

2009-07-10 Thread Steven D'Aprano
On Fri, 10 Jul 2009 09:22:29 -0400, Nikolaus Rath wrote: > Hello, > > I want to implement a caching data structure in Python that allows me > to: > > 1. Quickly look up objects using a key 2. Keep track of the order in > which the objects are accessed (most > recently and least recently ac

Implementing a cache

2009-07-10 Thread Nikolaus Rath
Hello, I want to implement a caching data structure in Python that allows me to: 1. Quickly look up objects using a key 2. Keep track of the order in which the objects are accessed (most recently and least recently accessed one, not a complete history) 3. Quickly retrieve and remove the le

Implementing a cache?

2007-03-01 Thread Jeff McNeil
I've got a question regarding the implementation of a caching system that I'm porting over from C. I have multiple processes across an array of systems that must retrieve data from a central database at a fairly high rate. The current system uses shared memory and supports expiry after a configu