from the documentation for the game: http://www.playframework.org/documentation/1.1.1/cache
Play has a cache library and will use Memcached when used in a distributed environment. If you don't configure Memcached, Play will use a standalone cache that stores data in the JVM heap. Caching data in the JVM application breaks the "share nothing" assumption made by Play: you can't run your application on several servers, and expect the application to behave consistently. Each application instance will have a different copy of the data.
You can put any object in the cache, as in the following example (in this example, from the document http://www.playframework.org/documentation/1.1.1/controllers#session, you use the .getId () session to save messages for each user )
public static void index() { List messages = Cache.get(session.getId() + "-messages", List.class); if(messages == null) {
Since this is a cache, not a session, you should take into account that the data may be inaccessible and have some value to extract from it again (in this case, the message model)
In any case, if you have enough memory, and this is due to a short interaction with the user, the data should be there, and in case you cannot redirect the user to the beginning of the wizard (you are talking about some kind of wizard page, right?)
Keep in mind that playing with it without being tied to shared access doesnโt really have any sessiรณn at all, underneath it just processes it through cookies, so it can only accept lines of a limited size
opensas
source share