Configuration - Logging - Caching

Configuration

Spreadshirt Plugin is by default utlizing the API of the european platform spreadshirt.net. If you want to operate with the north american platform spreadshirt.com just set the following property within your Config.groovy:

//In Config.groovy:
de.kabtain.groovy.sprd.platform='na'

de.kabtain.groovy.sprd.api.key='your api key'
de.kabtain.groovy.sprd.api.secret='your api secret'

Logging

To follow calls to Spreadshirt API, enable log level info for the class de.kabtain.groovy.sprd.HttpService. It's an internal Service that does the whole HTTP handling:

//In Config.groovy
log4j = {
   info 'grails.app.service.de.kabtain.groovy.sprd.HttpService'
}

http://ehcache.org/documentation/configuration.html

Caching

Spreadshirt Plugin utilizes Springcache for caching. To influence caching policies, put a ehcache.xml file into your configuration path that might look like following:

<ehcache>
    <diskStore path="java.io.tmpdir"/>
    <defaultCache
            maxElementsInMemory="1000"
            eternal="false"
            timeToIdleSeconds="600"
            timeToLiveSeconds="600"
            overflowToDisk="true"
            memoryStoreEvictionPolicy="LFU"
            />

    <cache name="ArticleCache"
           maxElementsInMemory="1000"
           eternal="false"
           timeToIdleSeconds="600"
           timeToLiveSeconds="600"
           overflowToDisk="false"
           memoryStoreEvictionPolicy="LFU"
            />
</ehcache>

To configure each cache separately, please find the appropriate cache name within the SpreadshirtAPIService documentation.

Please find details about EHcache configuration in the EHcache docs.
For details in EHcache configuration

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.