Feature request: Cache action results.

Bug #361692 reported by eyes2near
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Fix Committed
Undecided
Erwan Loisant

Bug Description

I suggest to give a @Cache annotation to action methods, which will
tell play! to cache all the data it needs to render. When a subsequent
request comes, play can response with the cached data rather than an
invocation to the action.
It could be some code like this:

@Cache(expiration="1h") //expires 1 hour later
public static void cachedAction(){
     //do something
     Object aparam = ...
     render(aparam); // also could be renderXml/renderText/renderJson

Changed in play:
status: New → Confirmed
Erwan Loisant (eloisant)
Changed in play:
assignee: nobody → Erwan Loisant (eloisant)
Erwan Loisant (eloisant)
Changed in play:
status: Confirmed → In Progress
Revision history for this message
Erwan Loisant (eloisant) wrote :

It's committed.

I used "@Cache" but the problem is that it conflicts with play.cache.Cache (at least one has to be used with its namespace). Maybe a different name would be better, but I can't think of anything right now.

Changed in play:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.