cancel
Showing results for 
Search instead for 
Did you mean: 

Caching in a REST call

spilby
Confirmed Champ
Confirmed Champ
Good morning,

I'm having a caching problem… When I do a REST call to my Java Backed Webscript (a simply webscript that logs the properties of each node from a path) I could see that the result is cached, because if I modify these properties I can't see the changes until I restart. Every time the result is the same than the first call. Is normal?

This is my webscript code:

NodeRef folder = repository.getCompanyHome();
List pathElements = new ArrayList();
StringTokenizer tokenizer = new StringTokenizer( "User Homes/Directory 1/Directory 2", "/");
while (tokenizer.hasMoreTokens()) {
String childName = tokenizer.nextToken();
pathElements.add(childName);

NodeRef nodeRef2 = serviceRegistry.getFileFolderService().resolveNamePath(folder, pathElements).getNodeRef();
logger.debug("PROPERTIES —> " + getNodeService().getProperties(nodeRef2);
}

What can I do for return the real properties each time and not the first time result? What I'm doing wrong?

Thanks!
2 REPLIES 2

romschn
Star Collaborator
Star Collaborator
what have you defined in your desc.xml file? Have you made any entries there related to cache? Also, could you elaborate your problem bit more that what exactly is the issue you are facing?

mrogers
Star Contributor
Star Contributor
Have you got some sort of caching proxy in front of alfresco?  AFAIK there is no server-side way within alfresco to cache a result of a webscript.