comparison src/server/constants.py @ 985:64826e69f365

pages: cache mechanism, first draft: a cache mechanism has been implemented to retrieve pages with a complexe rendering and/or calling expensive methods (e.g. network calls). For now it's is done only for Pubsub and with service profile (i.e. profile used when user is not logged in). When a LiberviaPage use cache, node is subscribed, and as long as no event is received (even can be item update, item retraction, or node deletion), the cached page is returned. This is a first draft, it is planed to handle in the future logged users (which can be tricky as we must not let (un)subscribed node if user is not willing to), multi-nodes pages (e.g.: item + comments) and cache for page not depending on pubsub (e.g. chat).
author Goffi <goffi@goffi.org>
date Sun, 19 Nov 2017 17:18:14 +0100
parents fd4eae654182
children 6daa59d44ee2
comparison
equal deleted inserted replaced
984:f0fc28b3bd1e 985:64826e69f365
73 HTTP_BAD_REQUEST = 400 73 HTTP_BAD_REQUEST = 400
74 HTTP_UNAUTHORIZED = 401 74 HTTP_UNAUTHORIZED = 401
75 HTTP_NOT_FOUND = 404 75 HTTP_NOT_FOUND = 404
76 HTTP_INTERNAL_ERROR = 500 76 HTTP_INTERNAL_ERROR = 500
77 HTTP_SERVICE_UNAVAILABLE = 503 77 HTTP_SERVICE_UNAVAILABLE = 503
78
79 ## Cache ##
80 CACHE_PUBSUB = 0