Reminder: Create & find trunk-related issues here. Legacy Trac tickets are still available. Problems? Workflow feedback? Need a module project? Open a support ticket.

Logic Module

LogicCache never removes keys

Details

  • Type: Bug Bug
  • Status: Needs Assessment Needs Assessment
  • Priority: Could Could
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Severity:
    3
  • Complexity:
    Undetermined
  • Keywords:
  • Description:
    Hide

    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.

    Show
    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.

Activity

Hide
Burke Mamlin added a comment - 2008-11-25 16:07:17 EST

There are already plans to convert LogicCache to use ehcache for its caching mechanism rather than a simple Map (see TRAC-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.

Show
Burke Mamlin added a comment - 2008-11-25 16:07:17 EST There are already plans to convert LogicCache to use ehcache for its caching mechanism rather than a simple Map (see TRAC-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.
Hide
Burke Mamlin added a comment - 2008-11-25 16:34:44 EST

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

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

Show
Burke Mamlin added a comment - 2008-11-25 16:34:44 EST I split the extra issues in this ticket into TRAC-1135 and TRAC-1136. The primary issue (clearing of the cache) in this ticket will be addressed by ticket TRAC-1107, so this ticket could be closed; however, I'm leaving it open until we can ensure that LogicCache will not return expired results.

People

  • Assignee:
    Unassigned
    Reporter:
    Tammy Dugan
  • Votes:
    0
    Watchers:
    0

Dates

  • Created:
    2008-11-25 15:30:39 EST
    Updated:
    2010-07-23 09:23:05 EDT