springcache

A simple implement of spring cache by redis or memcached.

Лицензия

Лицензия

Группа

Группа

com.sohu.cache
Идентификатор

Идентификатор

springcache
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

springcache
A simple implement of spring cache by redis or memcached.
Ссылка на сайт

Ссылка на сайт

https://github.com/yezigl/springcache

Скачать springcache

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.sohu.cache/springcache/ -->
<dependency>
    <groupId>com.sohu.cache</groupId>
    <artifactId>springcache</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.sohu.cache/springcache/
implementation 'com.sohu.cache:springcache:1.1.0'
// https://jarcasting.com/artifacts/com.sohu.cache/springcache/
implementation ("com.sohu.cache:springcache:1.1.0")
'com.sohu.cache:springcache:jar:1.1.0'
<dependency org="com.sohu.cache" name="springcache" rev="1.1.0">
  <artifact name="springcache" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.sohu.cache', module='springcache', version='1.1.0')
)
libraryDependencies += "com.sohu.cache" % "springcache" % "1.1.0"
[com.sohu.cache/springcache "1.1.0"]

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.2
org.springframework : spring-core jar 3.2.1.RELEASE
org.springframework : spring-context jar 3.2.1.RELEASE
com.alibaba : fastjson jar 1.1.24
redis.clients : jedis Необязательный jar 2.1.0
com.googlecode.xmemcached : xmemcached Необязательный jar 1.3.9

runtime (2)

Идентификатор библиотеки Тип Версия
org.slf4j : jcl-over-slf4j jar 1.7.2
ch.qos.logback : logback-classic jar 1.0.9

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.10
org.springframework : spring-test jar 3.2.1.RELEASE

Модули Проекта

Данный проект не имеет модулей.

springcache

A simple implement of spring cache by redis or memcached.

Usage:

<cache:annotation-driven cache-manager="springcacheManager" />

<!-- for redis -->
<bean id="springcacheManager" class="com.sohu.cache.springcache.jedis.JedisCacheManager">
    <property name="namedClients">
        <map>
            <entry key="default" value="127.0.0.1:6379 127.0.0.1:6380" /><!-- separate by space -->
        </map>
    </property>
    <property name="cacheStoreJedisHashRouter">
        <bean class="com.sohu.cache.springcache.CacheStoreJedisHashRouter" />
    </property>
    <property name="serializer">
        <bean class="com.sohu.cache.common.JsonSerializer" />
    </property>
    <property name="expires" value="604800" /><!--7 days, second -->
    <property name="maxActive" value="100" />
    <property name="testOnBorrow" value="true" />
</bean>

<!-- for memcached -->
<bean id="springcacheManager" class="com.sohu.cache.springcache.xmemcached.XmemCacheManager">
    <property name="namedClients">
        <map>
            <entry key="default" value="127.0.0.1:11211 127.0.0.1:11212" /><!-- separate by space -->
        </map>
    </property>
    <property name="serializer">
        <bean class="com.sohu.cache.common.JsonSerializer" />
    </property>
    <property name="expires" value="604800" /><!--7 days, second -->
    <property name="maxConn" value="8" />
    <property name="consistent" value="true" /><!-- nginx consitent hash -->
</bean>

Dependency:

<!-- redis -->
<dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>
    <version>${jedis.version}</version>
</dependency>

<!-- memcached -->
<dependency>
    <groupId>com.googlecode.xmemcached</groupId>
    <artifactId>xmemcached</artifactId>
    <version>${xmemcached.version}</version>
</dependency>

Версии библиотеки

Версия
1.1.0