Skip to content

InnovaCo/play2memcached

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memcached plugin for Playframework 2 (play2memcached)

This is a plugin for Play2 which implements default play Cache interface for the Memcached. Also plugin has enhanced async interface.

Usage

To use memcached plugin simply add in file project/play.plugins the following line:

0:eu.inn.play2memcached.MemcachedPlugin

And in build.sbt like this:

libraryDependencies ++= Seq(
	...
	"eu.inn" %% "play2memcached" % "0.1"
) 

After that you can use regular Play2 Cache API:

val value = Cache.get(key)
Cache.set(data.key, data.value.get)
Cache.remove(data.key)

or asynchronous versions:

Memcached.getAsync(key)
Memcached.setAsync(data.key, data.value.get)
Memcached.removeAsync(data.key)

You can find full working example app in examples/hello.

Restrictions

Currently this tested and works with string data using play 2.2.

Releases

No releases published

Packages

No packages published

Languages