Polish cache sample

Update single cache sample with all supported cache providers. Add README
to shortly explain how to get started with them.

See gh-2633
This commit is contained in:
Stephane Nicoll
2015-05-29 15:33:00 +02:00
parent 23a278451a
commit eef027a4f0
16 changed files with 345 additions and 171 deletions

View File

@@ -1 +0,0 @@
spring.cache.config=/cache/ehcache-override.xml

View File

@@ -0,0 +1,19 @@
#
# Infinispan configuration file location.
#
#spring.cache.infinispan.config=infinispan.xml
#
# JCache configuration (example with hazelcast).
#
#spring.cache.type=jcache
#spring.cache.jcache.config=hazelcast.xml
#
# Guava configuration
#
#spring.cache.guava.spec=maximumSize=200,expireAfterAccess=600s

View File

@@ -1,8 +0,0 @@
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true" monitoring="autodetect"
dynamicConfig="true">
<cache name="countries"
maxBytesLocalHeap="50m"
timeToLiveSeconds="100">
</cache>
</ehcache>

View File

@@ -1,8 +1,7 @@
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true" monitoring="autodetect"
dynamicConfig="true">
xsi:noNamespaceSchemaLocation="ehcache.xsd">
<cache name="countries"
maxBytesLocalHeap="50m"
timeToLiveSeconds="100">
maxEntriesLocalHeap="200"
timeToLiveSeconds="600">
</cache>
</ehcache>

View File

@@ -0,0 +1,17 @@
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.4.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<map name="countries">
<time-to-live-seconds>600</time-to-live-seconds>
<max-size>200</max-size>
</map>
<cache name="countries">
<eviction size="200"/>
<statistics-enabled>true</statistics-enabled>
<management-enabled>true</management-enabled>
</cache>
</hazelcast>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns="urn:infinispan:config:7.2">
<cache-container default-cache="default">
<local-cache name="countries">
<eviction max-entries="200"/>
<expiration lifespan="600000"/>
</local-cache>
</cache-container>
</infinispan>