On 04/05/2009, at 8:33 PM, Andrus Adamchik wrote:

I tried to stay away from the implementation details and give a user perspective instead. If there is still a feeling that the docs are lacking in this area, please share your thoughts. I will try to address any reasonable suggestions.

OK. I have some questions which may need a little more explanation in the docs.

On the object cache page you discuss Memory Management with the shared and local caches.

1. Should this section be moved to the parent page since it applies both to query and object caches? That is, is the memory space of 10,000 shared between object and query cache?

2. If an object is stored in the shared cache by one context and another context uses it, will localObject() need to be called on it to move it to the correct context or is that all handled automatically?

3. If objects are always synchronised between local caches is refreshing ONLY needed when thinking about multiple instances of the application in separate JVMs? If so, this could be made even clearer in the refreshing section.

"Object caching happens behind the scenes, so the only case when users need to worry about object cache is when an object gets stale and needs to get refreshed"

maybe instead:

"Object cache refreshing is done automatically for you be Cayenne, so the only case users need to worry about refreshing manually is when you are running multiple instances of the application in separate JVMs. In that case you have the following options:"


4. I'd like to understand a little better the relationship between query cache and object cache. For example, will Cayenne every perform a query against the database and then throw away the results it gets because it sees that the objectIds are already in the object cache? That is, does a query which hits the db always result in a refresh of the object cache?

And, if the query is cached and therefore no SELECT is issued, will the results sometimes include hollow objects which will then be faulted? Perhaps the object cache was full and those objects had been expired.

So, whether the object cache is refreshed will depend on whether a query hits the db or comes from cache?


Ari

-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A


Reply via email to