ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankar" <fatboys...@gmail.com>
Subject Caching not working
Date Wed, 18 Jun 2008 00:07:34 GMT
Hi,
       I tried to cache the data returned by my stored proc and I am seeing
that the data fetched from the procedure is not cached at all. Am I doing
wrong here. I tried to use OSCache and Memory. Both dont seem to work at all
for me.

My configurations are

<cacheModel id="oscache" type="OSCACHE">
            <flushInterval hours="24"/>
        </cacheModel>
        <cacheModel id="memory-cache" type="MEMORY">
            <flushInterval hours="24"/>
        </cacheModel>

<procedure id="something"
        parameterMap="someParam" cacheModel="oscache">
        {? = call someProc}
    </procedure>

My oscache.properties is fairly simple and has

cache.memory=true
#cache.capacity=1000
#cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache
cache.use.host.domain.in.key=true
cache.path=c:\\Sundar\\cache

###################################################

My debug statements are

2008-06-17 16:49:53,148 DEBUG [com.ibatis.sqlmap.engine.cache.CacheModel]
Cache 'oscache': *cache miss*
2008-06-17 16:49:53,148 DEBUG [java.sql.Connection] {conn-100019} Preparing
Call: {? = call someProc}
2008-06-17 16:49:53,179 DEBUG [java.sql.PreparedStatement] {pstm-100020}
Executing Statement: {? = call someProc}
2008-06-17 16:49:53,179 DEBUG [java.sql.PreparedStatement] {pstm-100020}
Parameters: []
2008-06-17 16:49:53,179 DEBUG [java.sql.PreparedStatement] {pstm-100020}
Types: []
2008-06-17 16:49:53,195 DEBUG
[com.ibatis.sqlmap.engine.cache.CacheModel] *Cache
'oscache': stored object '[]'*


Dont know what I am doing wrong. I tried changing the congiguration to point
to the memory-cache config I have. Still yeilds the same results. Any help
on this is greatly appreciated.

Regards
Sundar Sankarnarayanan

Mime
View raw message