Skip to main content
1-Visitor
January 31, 2017
Question

Caching Concept in ThingWorx

  • January 31, 2017
  • 1 reply
  • 2142 views

Hi, Need information on Caching concept in ThingWorx. I want to cache the result of a service all throughout an users session. Please suggest.

1 reply

1-Visitor
January 31, 2017

There isn't any cache options, you should implement by yourself. But where do you want to apply cache before the service call ( aka reverse proxy ) or inside the service call?

agupta-211-VisitorAuthor
1-Visitor
January 31, 2017

Hi Carles,

Thanks for the response.

I have a service which takes long time to give the result(infotable) because of some searches happening in the service. I want result of the service to be cached for a particular user session.i.e. when a user logged in then the service executed once and then the cache is to be used further for that particular user. Again when he logs in then the service should executed fresh and later cache can be used. This way it should continue.

1-Visitor
January 31, 2017

Build an Infotable property (not persistent) on user session with the calculated result ( lazy programing ), then you can do a timer which every hour looks if the user it's logged in or not, if it's not just clean the infotable property.