[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uwsgi
Subject:    [uWSGI] Django Cache Middleware Problems
From:       ryanshow () gmail ! com (Ryan Showalter)
Date:       2011-07-28 14:20:04
Message-ID: CAK=Tn5JEJmp01MebuYgT3wRwaObDYepUyeBeoYXzB7HaF3y=aA () mail ! gmail ! com
[Download RAW message or body]

Hey Riccardo,

On Thu, Jul 28, 2011 at 7:05 AM, Riccardo Magliocchetti
<riccardo.magliocchetti at gmail.com> wrote:
> Hi Ryan,
>
> Il 28/07/2011 15:51, Ryan Showalter ha scritto:
>>
>> Hey Riccardo,
>>
>> cache_update does not seem to be available in the uwsgi module. Here
>> is the result of a simple query...
>>
>> print [x for x in dir(uwsgi) if 'cache_' in x]
>> ['cache_del', 'cache_exists', 'cache_get', 'cache_set']
>
> You have to update to latest mercurial tip, your code gives here:
> ['cache_del', 'cache_exists', 'cache_get', 'cache_set', 'cache_update']
>
> Also please don't top-post :)
>
> thanks,
> riccardo

Updating to tip seems to work great with cache_update, thanks very much!

Ryan-

>>
>>
>> On Thu, Jul 28, 2011 at 3:52 AM, Riccardo Magliocchetti
>> <riccardo.magliocchetti at gmail.com> ?wrote:
>>>
>>> Ryan,
>>>
>>>>> Il 28/07/2011 09:08, Ryan Showalter ha scritto:
>>>>>>
>>>>>> However, I came across a slight issue that needs attention. ?The
>>>>>> django cache middleware example that is posted on the website is not
>>>>>> completely functional as-is. ?I think this is due to a bug in uWSGI.
>>>>>>
>>>>>> the "set" method does not update cache entries that are already
>>>>>> stored. ?It acts like the "add" method.
>>>>>>
>>>
>>> you've found a quite embarassing bug :) I've missed that cache_set was
>>> not
>>> overwriting the previous value. Roberto kindly added a new function
>>> cache_update in latest tip that does that and i've updated the code in
>>> the
>>> wiki accordingly.
>>>
>>> See the diff:
>>>
>>> http://projects.unbit.it/uwsgi/wiki/CachingFramework?action=diff&version=19&old_version=17
>>>
>>> Unfortunately it'll take a bit to me to test that so could you please
>>> give
>>> it a try?
>>>
>>> thanks,
>>> riccardo
>>>
>>> _______________________________________________
>>> uWSGI mailing list
>>> uWSGI at lists.unbit.it
>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>>
>> _______________________________________________
>> uWSGI mailing list
>> uWSGI at lists.unbit.it
>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic