<div tal:replace="structure here/manage_page_header" />
  <h2 tal:define="manage_tabs_message request/manage_tabs_message | options/manage_tabs_message | nothing;
                  management_view options/management_view|nothing"
        tal:replace="structure here/manage_tabs">
      Tabs
  </h2>

    <p class="form-help">
      The <em>Page Cache Manager</em> allows you to cache object views
      (including headers).  Note that Page Cache Manager will not yield
      a cache hit unless the view associated with the cache manager sets
      an ETag header.
    </p>

    <form tal:attributes="action python:context.absolute_url()" method="post"
          tal:define="settings python:context.getSettings()">

    <table cellspacing="0" cellpadding="2" border="0">
      <tr>
        <td align="left" valign="top">
          <div class="form-optional">Title</div>
        </td>
        <td align="left" valign="top">
          <input type="text" name="title" size="40" 
                 tal:attributes="value context/title" />
        </td>
      </tr>
      <tr>
        <td colspan="2">
          Turn cache on or off.
        </td>
      </tr>
      <tr>
        <td align="left" valign="top">
          <div class="form-label">Active</div>
        </td>
        <td align="left" valign="top">
          <select name="active">
            <option value="on_always" tal:attributes="selected python:settings.get('active','on_always')=='on_always'">On</option>
            <option value="on_in_production" tal:attributes="selected python:settings.get('active','on_always')=='on_in_production'">Off in debug mode</option>
            <option value="off" tal:attributes="selected python:settings.get('active','on_always')=='off'">Off</option>
          </select>
        </td>
      </tr>
      <tr>
        <td colspan="2">
          Maximum number of seconds a page should be cached in a Page Cache.
        </td>
      </tr>
      <tr>
        <td align="left" valign="top">
          <div class="form-label">Maximum Page Cache time</div>
        </td>
        <td align="left" valign="top">
          <input type="text" name="max_age" size="6"
                 tal:attributes="value settings/max_age" />
        </td>
      </tr>

      <tr>
        <td colspan="2">
          Number of entries in a Page Cache that will trigger a cleanup.
        </td>
      </tr>
      <tr>
        <td align="left" valign="top">
          <div class="form-label">Page Cache threshold entries</div>
        </td>
        <td align="left" valign="top">
          <input type="text" name="threshold" size="40" 
                 tal:attributes="value settings/threshold" />
        </td>
      </tr>
      <tr>
        <td align="left" valign="top">
          <div class="form-label">Cache cleanup interval (seconds)</div>
        </td>
        <td align="left" valign="top">
          <input type="text" name="cleanup_interval" size="40" 
                 tal:attributes="value settings/cleanup_interval" />
        </td>
      </tr>
      <tr>
        <td align="left" valign="top"></td>
        <td align="left" valign="top">
          <div class="form-element">
            <input class="form-element" type="submit" name="manage_editProps:method" 
                   value="Save Changes" /> 

            <input class="form-element" type="submit" name="manage_purge:method"
                   value="Clear Cache" />
          </div>
        </td>
      </tr>
    </table>
  </form>
<div tal:replace="structure here/manage_page_header" />
