Ticket filed and pull request for fix
https://code.djangoproject.com/ticket/22606
On 9 May 2014 10:38, Malcolm Box wrote:
>
> On Thursday, 8 May 2014 16:59:55 UTC+1, Piotr Gosławski wrote:
>>
>> I was fixing my little helper function to behave more like Sean's and I
>> think I've found a bug in
On Thursday, 8 May 2014 16:59:55 UTC+1, Piotr Gosławski wrote:
>
> I was fixing my little helper function to behave more like Sean's and I
> think I've found a bug in locmem. Could you please take a look at this:
>
> Either I'm missing something or has_key() is not working correctly for
> keys w
I was fixing my little helper function to behave more like Sean's and I
think I've found a bug in locmem. Could you please take a look at this:
>>> cache
>>> cache.set('a', 1)
>>> cache.set('b', 2, None)
>>> cache.get('a')
1
>>> cache.get('b')
2
>>> cache.has_key('a')
True
>>> cache.has_key('b')
It would sacrifice atomicity of incr()/decr() methods and hit their speed
pretty hard.
W dniu wtorek, 6 maja 2014 16:47:53 UTC+2 użytkownik adamcik napisał:
>
> On Tue, May 06, 2014 at 05:57:28AM -0700, Piotr Gosławski wrote:
> > W dniu wtorek, 6 maja 2014 11:47:17 UTC+2 użytkownik Florian Apoll
W dniu wtorek, 6 maja 2014 16:47:53 UTC+2 użytkownik adamcik napisał:
>
> See
> https://groups.google.com/d/msg/django-developers/ctKJzBTONu8/opbWqUIcOKgJ
> for a similar case that has come up before. The tuple solution used there
> could easily be adapted to store the time the key will expire,
On Tue, May 06, 2014 at 05:57:28AM -0700, Piotr Gosławski wrote:
> W dniu wtorek, 6 maja 2014 11:47:17 UTC+2 użytkownik Florian Apolloner
> napisał:
> >
> > [...]
> > Memcached doesn't provide access to the remaining TTL, and I don't see how
> > we can reasonably fake this without writing an extr
On Tue, May 6, 2014 at 8:57 AM, Piotr Gosławski
wrote:
> W dniu wtorek, 6 maja 2014 11:47:17 UTC+2 użytkownik Florian Apolloner
> napisał:
>>
>> [...]
>>
>> Memcached doesn't provide access to the remaining TTL, and I don't see
>> how we can reasonably fake this without writing an extra key contai
W dniu wtorek, 6 maja 2014 11:47:17 UTC+2 użytkownik Florian Apolloner
napisał:
>
> [...]
> Memcached doesn't provide access to the remaining TTL, and I don't see how
> we can reasonably fake this without writing an extra key containing the
> expiration date.
>
> Would that be unacceptable to a
On Tue, May 6, 2014 at 5:47 PM, Florian Apolloner wrote:
> Hi Russ,
>
>
> On Tuesday, May 6, 2014 2:54:52 AM UTC+2, Russell Keith-Magee wrote:
>>
>> As far as the NotImplemented bit goes - I'd rather see this implemented
>> for all officially supported backends, rather than only one backend. The
>
Hi Russ,
On Tuesday, May 6, 2014 2:54:52 AM UTC+2, Russell Keith-Magee wrote:
>
> As far as the NotImplemented bit goes - I'd rather see this implemented
> for all officially supported backends, rather than only one backend. The
> only exception to this would be if there is a fundamental technic
Hi Piotr,
For what it's worth, I have an implementation of ttl on django-redis-cache:
https://github.com/sebleier/django-redis-cache/commit/626a3263c428cf59b1428f5fc2aa638efd77346a
It's slightly different from your snippet in that if the key does not exist
(because it is expired or didn't exist i
On Tue, May 6, 2014 at 4:16 AM, Piotr Gosławski
wrote:
> Hi!
>
> Since the contribution workflow is a bit confusing to me, I'll just leave
> it here.
> I think django's cache needs ttl (time to live) method that would return
> time left until specified key expires. I, for instance, needed one when
Hi!
Since the contribution workflow is a bit confusing to me, I'll just leave
it here.
I think django's cache needs ttl (time to live) method that would return
time left until specified key expires. I, for instance, needed one when
writing
a rate limiter. Without it I would have to store twice a
13 matches
Mail list logo