You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Julian Reschke <ju...@gmx.de> on 2014/10/25 14:27:49 UTC

DocumentMK: refreshing cache entries

Hi there,

both the MongoDocumentStore and the RDBDocumentStore maintain a 
"_modCount" property, which uniquely identifies a version of a document 
in the persistence.

Sometimes, we read data from the persistence although we already might 
have the document cached. This happens:

a) when the cached document is older than what the caller asked for

b) when running a query (for instance when looking up children of a node)

In both cases, we currently replace the cache entry with a newly built 
NodeDocument.

Question:

Would it make sense to re-use the existing document instead? (This would 
probably require modifying the "created" timestamp, but would avoid the 
trouble of having to update the cache at all)

Best regards, Julian

Re: DocumentMK: refreshing cache entries

Posted by Julian Reschke <ju...@greenbytes.de>.
On 2014-10-29 11:25, Marcel Reutegger wrote:
> Hi,
>
> I haven't looked at details, but it sounds reasonable. Can you
> create an issue and a patch for review?
>
> Regards
>   Marcel

Si.

Issue: <https://issues.apache.org/jira/browse/OAK-2242>

Best regards, Julian

Re: DocumentMK: refreshing cache entries

Posted by Marcel Reutegger <mr...@adobe.com>.
Hi,

I haven't looked at details, but it sounds reasonable. Can you
create an issue and a patch for review?

Regards
 Marcel

On 25/10/14 14:27, "Julian Reschke" <ju...@gmx.de> wrote:

>Hi there,
>
>both the MongoDocumentStore and the RDBDocumentStore maintain a
>"_modCount" property, which uniquely identifies a version of a document
>in the persistence.
>
>Sometimes, we read data from the persistence although we already might
>have the document cached. This happens:
>
>a) when the cached document is older than what the caller asked for
>
>b) when running a query (for instance when looking up children of a node)
>
>In both cases, we currently replace the cache entry with a newly built
>NodeDocument.
>
>Question:
>
>Would it make sense to re-use the existing document instead? (This would
>probably require modifying the "created" timestamp, but would avoid the
>trouble of having to update the cache at all)
>
>Best regards, Julian