try to swap the order of the decoratos
Paolo
On Sunday, January 11, 2015 at 11:59:21 AM UTC+1, aapaap wrote:
>
> hello,
>
> I've a service, for which the output can change only ones every 10
> minutes. So I want to cache the resulting output.
> To test if caching is working, I made the following setup:
> - In the view there's a javascript that requests a refresh of the data
> every minute.
> - A global sys.N_Schuurdak signals is used to see if the calculations
> are done
>
> try:
> sys.N_Schuurdak
> except :
> sys.N_Schuurdak = 10
>
> #************************************************************
> #************************************************************
> @cache('service_schuurdak', 600, cache.ram )
> @service.csv
> def service_schuurdak():
> sys.N_Schuurdak += 1
> # here Rows are calculated (in which sys.N_Schuurdak is substituted
> for test)
> ....
> return Rows
>
> Now if I open the webpage in a browser, I see the variable
> sys.N_Schuurdak incremented every minute.
> So my conclusion is that caching is not working.
>
> Is my conclusion correct ?
>
> What am I doing wrong ?
>
> thanks,
> Stef
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.