All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.mumoshu.play2.memcached.MemcachedCacheApiProvider.scala Maven / Gradle / Ivy

There is a newer version: 0.9.1
Show newest version
package com.github.mumoshu.play2.memcached

import play.api.Configuration
import play.api.inject.{BindingKey, Injector}

import javax.inject.{Inject, Singleton, Provider}

import net.spy.memcached.MemcachedClient

@Singleton
class MemcachedCacheApiProvider(namespace: String, client: BindingKey[MemcachedClient], configuration: Configuration) extends Provider[MemcachedCacheApi] {
  @Inject private var injector: Injector = _

  lazy val get: MemcachedCacheApi = {
    new MemcachedCacheApi(namespace, injector.instanceOf(client), configuration)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy