caching documentation

From: Marcin Skladaniec (marci..sh.com.au)
Date: Mon Mar 03 2008 - 18:26:03 EST

  • Next message: Razumovsky Andrey: "Re: Expressions & objects state"

    Hi

    The documentation on caching (http://cayenne.apache.org/doc/caching-and-fresh-data.html
      and http://cayenne.apache.org/doc/object-caching.html) isn't very
    comprehensive, it does not answer questions like:

    - what is actually stored in cache pks? datarows ? objectIds ?
    - does caching change when paging is on ?
    - does caching require special measures when used with ROP ? (meaning
    the propagation of changes between contexts)
    - how to properly use SelectQuery.setCacheGroups()? what happens when
    a query has more than one cache group specified?
    - how long the cache entries sit in the memory, is there a way to
    invalidate all cache from time to time ?
    - how to invalidate cache using RefreshQuery, the http://cayenne.apache.org/doc/refreshquery.html
      is just a list of suggestions on how it might work in the future.

    Me and Ari are willing to document the caching feature, but we would
    need some help.

    Another issue is that the following code wont refresh cache:

    context.performQuery(new SelectQuery(abc));
    context.performQuery(new RefreshQuery(new SelectQuery(abc)));
    context.performQuery(new SelectQuery(abc));

    while this will:
    SelectQuery sq = new SelectQuery(abc);
    context.performQuery(sq);
    context.performQuery(new RefreshQury(sq));
    context.performQuery(sq);

    Does it mean that if the setCacheGroups or query name is not specified
    the cache engine uses hashcode() as query/cache entry identifier ?
    This would mean that a query cannot be successfully cached between two
    ROP clients.

    With regards
    Marcin





    This archive was generated by hypermail 2.0.0 : Mon Mar 03 2008 - 18:26:39 EST