Source

oscache / src / webapp / groupTest.jsp

<%@ page import="java.util.*" %>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>

<head>
<title>Test Page</title>
<style type="text/css">
body {font-family: Arial, Verdana, Geneva, Helvetica, sans-serif}
</style>
</head>
<body>

<a href="<%= request.getContextPath() %>/">Back to index</a><p>
<hr>Flushing 'group2'...<hr>
<cache:flush group='group2' scope='application'/>
<hr>
<cache:cache key='test1' groups='group1,group2' duration='5s'>
    <b>Cache Time</b>: <%= (new Date()).getTime() %><br>
    This is some cache content that is in 'group1' and 'group2'. Normally it would refresh if it
    was more than 5 seconds old, however the &lt;cache:flush group='group2' scope='application'&gt;
    tag causes this entry to be flushed on every page refresh.<br>
</cache:cache>
<hr>
<cache:cache key='test2' groups='group1' duration='5s'>
    <b>Cache Time</b>: <%= (new Date()).getTime() %><br>
    This is some cache content that is in 'group1' (refreshes if more than 5 seconds old)<br>
</cache:cache>
<hr>
<cache:cache key='test3' duration='20s'>
    <b>Cache Time</b>: <%= (new Date()).getTime() %><br>
    This is some cache content that is in 'group1' and 'group2'. The groups are added using the &lt;cache:addgroup /&gt; tag.<br>
    <cache:addgroup group='group1'/>
    <cache:addgroup group='group2'/>
</cache:cache>
<hr>
</body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.