« Return to Thread: Incomplete/cached list

Incomplete/cached list

by Stephen Kestle :: Rate this Message:

Reply to Author | View in Thread

I'm working on some task-based software, and want to maintain views of the tasks for easy querying - enter Glazed Lists.
The problem I'm facing:
So, I need to:
  1. Lazily build the backing list by the view requests
  2. Update the backing list as appropriate for the requested views
  3. Automatically dispose list views via same sort of cache-like algorithm
1 and 2 I'm thinking will already be supplied, or easily possible, but the last... is this something I'd need to write myself?

Is this the right thing:
  1. Have an CachedEventList that is essentially a cached list (something that will indicate when something is being removed due to cache expiry/size constraints)
  2. ... referenced by a ListViewCache where lists can be retrieved by matchers:
    1. If it exists, then return the list view
    2. otherwise, Request it from the CachedEventList, which will ensure full population
  3. If the CachedEventList purges a task (expiry/size constraints), the ListViewCache (as a listener of the CachedEventList) will dispose the appropriate views.  A brute force implementation could iterate through all the ListViewCache's keyed matchers to see if they match the purged task...
Has this been done before? Is it the right direction to head in?

Thanks heaps for an awesome idea/implementation...

Stephen

 « Return to Thread: Incomplete/cached list