Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-444
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CAY-444
Summary: Shared Cache does not refresh properly
Type: Bug
Status: Assigned
Priority: Major
Project: Cayenne
Components:
Cayenne Core Library
Versions:
1.2 [DEV]
Assignee: Andrus Adamchik
Reporter: Cris Daniluk
Created: Tue, 7 Feb 2006 12:06 PM
Updated: Tue, 7 Feb 2006 12:06 PM
Description:
Shared Cache does not appear to be properly updating:
public List getCachedObjects(Class cachedClass) {
DataContext dataContext = ...
String queryName = "Cache" + cachedClass.getSimpleName();
return dataContext.performQuery(queryName, false);
}
public void refreshQuery(Class cachedClass) {
DataContext dataContext = ...
String queryName = "Cache" + cachedClass.getSimpleName();
dataContext.performQuery(queryName, true);
}
If I add a record of type Class, then call refreshQuery(Class), a database operation is triggered:
INFO [http-8080-Processor24] (org.objectstyle.cayenne.access.QueryLogger:336) - 2006-02-07 11:50:15,495 SELECT ...
INFO [http-8080-Processor24] (org.objectstyle.cayenne.access.QueryLogger:387) - 2006-02-07 11:50:15,808 === returned 291 rows. - took 313 ms.
INFO [http-8080-Processor24] (org.objectstyle.cayenne.access.QueryLogger:414) - 2006-02-07 11:50:15,839 +++ transaction committed.
If I then re-execute getCachedObjects within the same query, I get 290 results, not the 291 expected.
It appears that setting refreshObjects to true works once, but does not trigger an update in the cache.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://objectstyle.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
This archive was generated by hypermail 2.0.0 : Tue Feb 07 2006 - 12:07:39 EST