diff 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
line wrap: on
line diff
--- a/src/server/constants.py	Fri Nov 17 12:10:56 2017 +0100
+++ b/src/server/constants.py	Sun Nov 19 17:18:14 2017 +0100
@@ -75,3 +75,6 @@
     HTTP_NOT_FOUND = 404
     HTTP_INTERNAL_ERROR = 500
     HTTP_SERVICE_UNAVAILABLE = 503
+
+    ## Cache ##
+    CACHE_PUBSUB = 0