mumoshu / play2-memcached

A memcached plugin for Play 2.x
Other
161 stars 66 forks source link

[play 2.3.8] How to cache play Result.Status object for memcache #38

Open puneetar opened 9 years ago

puneetar commented 9 years ago

Hey,

How can I cache the play Result.Status object in memcache. Currently when I try to do that, it gives me a NotSerializable Exception, as Result.Status does not implement Serializable.

Is there a way i can achieve this with this plugin ?

mkurz commented 7 years ago

You have to use SerializableResult, see here: https://github.com/playframework/playframework/blob/2.6.1/framework/src/play-cache/src/main/scala/play/api/cache/Cached.scala#L189