I need to implement a simple form of caching, like this:
<%! Cache cache=new Cache();
%>
<% String result="";
if(result is in cache)
out.print(cache.get(result);
else{
result=<my_taglib:my_tag parameter="my_parameter"/>
cache.add(result);
out.print(result);
}
%>
However this seems not to work. Any ideas?