I'm having trouble to avoid caching pages that returned anything else than
HTTP 200.
Consider the following simple example:
@cache.action(time_expire=300, cache_model=cache.redis, session=False, vars=
False, public=True, valid_statuses=[200])
def index():
raise HTTP(503)
When I hit the URL the first time, I can see in deed a 503 response status
(I checked headers with Chrome Inspector), and there is nothing cached (I
checked redis stored keys).
But the second time I hit the URL, the server returns an HTTP 200 with an
empty body, and it keeps returning HTTP 200 for the 5 minutes
(time_expire=300).
After that time, I hit the URL again, and I can see the HTTP 500.
What am I missing?
--
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.