Commits

chri...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed ca1a034

Initial revision

  • Participants
  • Parent commits adaa0e1

Comments (0)

Files changed (1)

File src/webapp/oscacheTest.jsp

+<%@ page import="java.util.*" %>
+<%@ taglib uri="oscache" prefix="cache" %>
+
+<%
+String scope = "application";
+if (request.getParameter("scope") != null)
+{
+	scope = request.getParameter("scope");
+}
+
+boolean refresh = false;
+if (request.getParameter("refresh") != null)
+{
+	refresh = true;
+}
+
+boolean forcecacheuse = false;
+if (request.getParameter("forcecacheuse") != null)
+{
+	forcecacheuse = true ;
+}
+%>
+<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>
+ <cache:cache
+	refresh='<%= refresh %>'
+	scope="<%= scope %>"
+	key="oscacheTest"
+	duration="2s">
+
+	<b>Cache Time</b>: <%= new Date() %><br>
+
+	<b>This is some cache content (refresh = 2 seconds)</b><br><br>
+	<%
+	if (forcecacheuse)
+	{
+	%>
+		<cache:usecached />
+	<%
+	}
+	%>
+</cache:cache>
+</body>
+</html>