Re: ORM Cache -- CachedModel

2008-01-25 Thread David Cramer
Yep, commit if you see something that you think is worthwhile. Most of my commits are random gibberish notes. In regards to clean. The originaly concept was it would delete the cache key, reset would refresh it. With memcache you don't need to delete them for the most part. The methods/organizati

Re: ORM Cache -- CachedModel

2008-01-25 Thread Jeremy Dunck
On Jan 23, 2008 7:35 PM, David Cramer <[EMAIL PROTECTED]> wrote: > > Some notes I shoved into a commit today: ... > > If you understand by gibberish, tell me what you think I don't understand that gibberish, but am starting to poke at the code a bit. Quick question on CacheManager.clean's commen

Re: ORM Cache -- CachedModel

2008-01-23 Thread David Cramer
Some notes I shoved into a commit today: # Signals rundown: # .cache(expire_on=['create', 'update', 'delete']) # use namespaces possible so the cache key becomes key_name:expire_namespace(not always present):hash # for example, a call with no expires: # db_table:hash # a call with a delete expi

Re: ORM Cache -- CachedModel

2008-01-21 Thread David Cramer
You can either use MyModel.nocache, or use MyModel._default_manager (I had been using the latter) On Jan 21, 6:09 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On Jan 21, 2008 4:10 PM, David Cramer <[EMAIL PROTECTED]> wrote: > > > > > So it seems I'm finally to the point of where the code is wo

Re: ORM Cache -- CachedModel

2008-01-21 Thread Jeremy Dunck
On Jan 21, 2008 4:10 PM, David Cramer <[EMAIL PROTECTED]> wrote: > > So it seems I'm finally to the point of where the code is working as > intended, at least for the initial phase. > Definitely going to test this locally. We use admin; I guess we can just make Admin.objects = Manager() to get t

Re: ORM Cache -- CachedModel

2008-01-21 Thread David Cramer
In fact, here's a shinier post with updated tests: http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html On Jan 21, 4:10 pm, David Cramer <[EMAIL PROTECTED]> wrote: > Project link is probably useful:http://code.google.com/p/django-orm-cache/ > :) > > On Jan 21, 4:10 pm, David Cram

Re: ORM Cache -- CachedModel

2008-01-21 Thread David Cramer
Project link is probably useful: http://code.google.com/p/django-orm-cache/ :) On Jan 21, 4:10 pm, David Cramer <[EMAIL PROTECTED]> wrote: > So it seems I'm finally to the point of where the code is working as > intended, at least for the initial phase. > > Anyways, I had some weird quirks, and I

ORM Cache -- CachedModel

2008-01-21 Thread David Cramer
So it seems I'm finally to the point of where the code is working as intended, at least for the initial phase. Anyways, I had some weird quirks, and I don't know Django internals as well as I'd like. I'd like to request anyone interested in the project, or with some spare time, take a quick glanc