source: products/vendor/Products.CacheSetup/current/Products/CacheSetup/skins/cache_setup/page_cache_config.cpt @ 3296

Last change on this file since 3296 was 3296, checked in by fenix, 12 years ago

Load Products.CacheSetup?-1.2.1 into vendor/Products.CacheSetup?/current.

  • Property svn:eol-style set to native
File size: 4.2 KB
Line 
1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2      lang="en"
3      metal:use-macro="here/prefs_main_template/macros/master"
4      i18n:domain="plone">
5
6<metal:block fill-slot="top_slot"
7             tal:define="dummy python:request.set('disable_border',1)" />
8
9<body>
10
11<div metal:fill-slot="prefs_configlet_content"
12        tal:define="cstool nocall:portal/portal_cache_settings;
13                    portal_type context/portal_type;
14                    policy cstool/getDisplayPolicy;
15                    config python:modules['Products.CacheSetup.config'];
16                    plone25 python:config.PLONE25;
17                    page_cache_id python:config.PAGE_CACHE_MANAGER_ID;
18                    page_cache python:getattr(portal, page_cache_id, None);">
19    <div class="documentEditable" tal:attributes="id python:plone25 and 'content' or ''">
20
21        <ul metal:use-macro="here/cache_tool_config/macros/cache_tabs"></ul>
22
23        <div metal:use-macro="here/global_contentviews/macros/content_actions">
24          The content bar
25        </div>
26
27        <div class="documentContent" id="region-content">
28            <a name="documentContent"></a>
29
30            <div class="configlet" tal:condition="python:page_cache is None">
31            <p>The page cache is not installed.  Enable CacheFu to install.</p>
32            </div>
33
34            <div class="configlet" tal:condition="python:page_cache is not None">
35                    <div metal:use-macro="here/global_statusmessage/macros/portal_message">
36                        Portal status message
37                    </div>
38                    <p>The page cache is an in-memory cache for web pages and their headers.  If you run low on memory,
39                      try reducing the size of the page cache.</p>
40                    <h2>Configure the page cache</h2>
41                    <form name="configurePageCache" method="post" tal:define="settings python:page_cache.getSettings();">
42                      <input type="hidden" name="form.submitted" value="1" />
43
44                      <div class="row">
45                        <label>Turn cache on/off</label>
46                      </div>
47                      <div class="row">
48                        <select name="active">
49                          <option value="on_always" tal:attributes="selected python:settings.get('active','on_always')=='on_always'">On</option>
50                          <option value="on_in_production" tal:attributes="selected python:settings.get('active','on_always')=='on_in_production'">Off in debug mode</option>
51                          <option value="off" tal:attributes="selected python:settings.get('active','on_always')=='off'">Off</option>
52                        </select>
53                      </div>
54
55                      <div class="row">
56                        <label>Maximum number of seconds a page should be cached</label>
57                      </div>
58                      <div class="row">
59                        <input type="text" name="max_age" size="6" tal:attributes="value settings/max_age" />
60                      </div>
61
62                      <div class="row">
63                        <label>Maximum number of pages in the cache</label>
64                      </div>
65                      <div class="row">
66                        <input type="text" name="threshold" size="40" tal:attributes="value settings/threshold" />
67                      </div>
68
69                      <div class="row">
70                        <label>Seconds between cache cleanups</label>
71                      </div>
72                      <div class="row">
73                        <input type="text" name="cleanup_interval" size="40" tal:attributes="value settings/cleanup_interval" />
74                      </div>
75
76                      <br />
77                      <div class="row">
78                        <input class="context"
79                               name="form.button.configure"
80                               value="Configure" type="submit" />
81                      </div>
82                    </form>
83
84                    <br />
85                    <h2>Purge the page cache</h2>
86                    <p>Click on the button below to purge the page cache:</p>
87                    <form name="purgePageCache" method="post"
88                        tal:attributes="action string:${context/absolute_url}/${template/id}">
89                    <input class="context"
90                           name="form.button.purge"
91                           value="Purge" type="submit" />
92                    <input type="hidden" name="form.submitted" value="1" />
93                    </form>
94                </div>
95        </div>
96    </div>
97</div>
98</body>
99</html>
Note: See TracBrowser for help on using the repository browser.