You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Florent Guillaume <fg...@nuxeo.com> on 2010/09/14 16:15:50 UTC
persistent session caching
Hi,
If you do:
doc = (Document) session.getObjectByPath("/testfile1");
assertEquals("some title", doc.getPropertyValue("dc:title"));
doc.updateProperties(Collections.singletonMap("dc:title",
"other title"));
doc = (Document) session.getObjectByPath("/testfile1");
assertEquals("other title", doc.getPropertyValue("dc:title"));
The last assertion fails with the AtomPub and WebServices bindings,
because the persistent session cache is not updated.
Should updateProperties update or invalidate the cache? Or is it the
job of the caller to deal with this?
Florent
--
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
Re: persistent session caching
Posted by Florian Müller <fl...@alfresco.com>.
Currently, this is the job of the caller.
"doc.refresh()" should do that. See also [1].
We postponed the discussion about persistent sessions and transient
sessions a couple of times. At the moment, it is somewhere in the middle
which can be confusing.
- Florian
[1]
https://cwiki.apache.org/confluence/display/CMIS/OpenCMIS+Cookbook#OpenCMISCookbook-Understandingtheclientsidecache
On 14/09/2010 15:15, Florent Guillaume wrote:
> Hi,
>
> If you do:
> doc = (Document) session.getObjectByPath("/testfile1");
> assertEquals("some title", doc.getPropertyValue("dc:title"));
> doc.updateProperties(Collections.singletonMap("dc:title",
> "other title"));
> doc = (Document) session.getObjectByPath("/testfile1");
> assertEquals("other title", doc.getPropertyValue("dc:title"));
>
> The last assertion fails with the AtomPub and WebServices bindings,
> because the persistent session cache is not updated.
>
> Should updateProperties update or invalidate the cache? Or is it the
> job of the caller to deal with this?
>
> Florent
>