Client cache enabled but not active
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2013 12:26 PM
Hi,
I'm looking at Alfresco's logs while fetching documents and I can see that each time I try to retrieve the same doc (same ID), a GET request is made to the remote repository.
I ran a test where I explicitly call
Do you think there may be other properties that should be set on the session that I'm missing? Or maybe some xml configuration for Alfresco?
Thanks
I'm looking at Alfresco's logs while fetching documents and I can see that each time I try to retrieve the same doc (same ID), a GET request is made to the remote repository.
I ran a test where I explicitly call
session.getDefaultContext().setCacheEnabled(true)
before calling session.getObject(id)
several times. It seems the cache is ignored as the GET command is issued each time.Do you think there may be other properties that should be set on the session that I'm missing? Or maybe some xml configuration for Alfresco?
Thanks
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2013 08:08 AM
seems to work for getObject if you're using the exact combination of id;version, but for actually retrieving the content, the cache is not used:
the last line triggers a GET to
Document document = (Document)session.getObject(id); document.getContentStream().getStream();
the last line triggers a GET to
alfresco_root/folder/content/doc_name?id=id;version
