[ http://nagoya.apache.org/jira/browse/IBATIS-7?page=history ]
Clinton Begin closed IBATIS-7:
------------------------------
Assign To: Clinton Begin
Resolution: Fixed
Fix Version: 2.0.8
Fixed.
> Cache size of 1 disables caching
> --------------------------------
>
> Key: IBATIS-7
> URL: http://nagoya.apache.org/jira/browse/IBATIS-7
> Project: iBatis for Java
> Type: Bug
> Components: SQL Maps
> Reporter: Clinton Begin
> Assignee: Clinton Begin
> Fix For: 2.0.8
>
> When a value of 1 is specified for the size property of a
> cacheModel then caching is disabled and iBATIS will
> always go to the database to run the query rather than
> pull the single cached object out of the cache. An
> example cache model that is affected by this problem is
> shown at the end of this message. I have not tested to
> see if the same problem occurs for FIFO cache models,
> but it does occur with a LRU cache model.
> This should not be the case since it makes sense to
> have a cache size of 1 if a select statement does not
> take any parameters and always returns the exact same
> results.
> As a work around for this bug I have had to set the
> cache size to 2 which then enables caching.
> Sample cache model:
> <cacheModel id="allProductsCache" type="LRU">
> <flushInterval hours="24"/>
> <property name="size" value="1" />
> </cacheModel>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira