Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #1134 (new task)

Opened 1 year ago

Last modified 1 year ago

LogicCache never removes keys

Reported by: tmdugan Assigned to: tmdugan
Priority: minor Milestone:
Component: Logic Service Keywords:
Cc: Introductory Ticket: 0
Code Review Status:

Description

The LogicCache is supposed to remove keys based on a ttl time defined in the rules and datasources. Currently, it never removes the keys. There is a clean() method in LogicCache that would accomplish this removal of keys but nothing is calling it. There needs to be something periodic like a schedulable task that checks every so often to clean out the cache. Also, as discussed during the logic-a-thon, the logic cache only applies to one rule evaluation. To be truly useful, it needs to apply across many evaluations. Additionally, the ttl time is not being converted into seconds within the LogicCacheEntryKey code. (See assignment of expires in the LogicCacheEntryKey constructors. The constructors need to multiply the ttl time by 1000.

Change History

11/25/08 16:07:17 changed by bmamlin

There are already plans to convert LogicCache to use ehcache for its caching mechanism rather than a simple Map (see #1107). Using ehcache will solve these issues and would obviate the need for us to re-invent functionality already provided by ehcache (i.e., cache management, including clearing out expired values).

In any case, LogicCache should never return and expired value. If an entry has expired, then it should appear (to any method calling LogicCache) as if the value is not cached.

11/25/08 16:34:44 changed by bmamlin

  • priority changed from major to minor.

I split the extra issues in this ticket into #1135 and #1136.

The primary issue (clearing of the cache) in this ticket will be addressed by ticket #1107, so this ticket could be closed; however, I'm leaving it open until we can ensure that LogicCache will not return expired results.