On Tuesday, July 22, 2014 9:47:11 AM UTC-7, Tom McNeer wrote:
>
> Is there any documentation for the use of the new caching configuration? 
> And are there other known areas where an old config might cause errors?
>


Tom, 

My apologies, this was so long ago for me I forgot it all changed.  Here's 
what you need to change your <objectCache> stanza in transfer.xml to:

<objectCache>
        <defaultcache provider="transfer.com.cache.provider.EHCacheProvider">
                <setting name="config" value="transfer/ehcache.xml" />
        </defaultcache>
</objectCache>


For an example, this is mine with some examples of objects for which I've 
specified no caching::

<objectCache>
  <defaultcache provider="transfer.com.cache.provider.EHCacheProvider">
    <setting value="/path/to/ehcache.xml" name="config"/>
  </defaultcache>
  <cache provider="transfer.com.cache.provider.NoCacheProvider" 
class="package.object"/>
  <cache provider="transfer.com.cache.provider.NoCacheProvider" 
class="package2.object2"/>
  <cache provider="transfer.com.cache.provider.NoCacheProvider" 
class="package2.object3"/>
</objectCache>

To get started, create an ehcache.xml file with one default cache:

<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd";>
<defaultCache
        maxElementsInMemory="1000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="900"
        overflowToDisk="false"
        />
</ehcache>


Converting from transfer.xml, timeToIdleSeconds replaces 
accessedminutestimeout and timeToLiveSeconds replaces maxminutespersisted. 
If you specify eternal=true, then the timeouts are ignored and the only 
thing that will cause an object to be discarded from the cache is running 
into the maxElementsInMemory limit.

If you want to get fancier, these are just a standard ehcache configuration 
file so you can use the docs here for more tunable options:
http://ehcache.org/documentation/user-guide/configuration

For an example, here is my ehcache.xml: 

<?xml version="1.0" encoding="UTF-8"?>
<ehcache xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<defaultCache overflowToDisk="false" eternal="true" 
maxElementsInMemory="350"/>
<!-- eternal for big objects -->
<cache overflowToDisk="false" eternal="true" maxElementsInMemory="750" 
name="event.event"/>
<cache overflowToDisk="false" eternal="true" maxElementsInMemory="300" 
name="track.track"/>
<!-- fine tune away from the defaults -->
<cache overflowToDisk="false" eternal="true" maxElementsInMemory="500" 
name="member.member"/>
<cache overflowToDisk="false" eternal="true" maxElementsInMemory="1000" 
name="member.clubmember"/>

<!-- short lived, eternal = false with ttl -->
<cache overflowToDisk="false" eternal="false" maxElementsInMemory="750" 
name="user.user" timeToIdleSeconds="900"/>
<cache overflowToDisk="false" eternal="false" maxElementsInMemory="1500" 
name="user.authrole" timeToIdleSeconds="900"/>
</ehcache>

 
Don't forget to delete all of your *.transfer files when upgrading!  
(which, now based on the github repo, will actually be *.transfer.cfm files)



-- 
-- 
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to transfer-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to