Caching and clearing in a proxy with relations between proxy calls -


As part of a system I am working in a proxy we have put a layer of caching into another system To say. The key of this cache, which is used in proxy calls, is made up of those key value pairs. Therefore, if the proxy is called from the same value then the item will be retrieved from the cash from other services. It works and is quite simple.

It comes to cleaning the cache, because it is not clear what items should be cleaned when the item is changed. If the object A is included in Nodeset B and the object A has been changed, then how do we know that the nodeset is B-beeled.

We have found a problem through this service that we return nodesets to clear the item while changing. However it breaks the encapsulation and adds a layer of complexity, so that we need to see if clearing is required.

Is there a better / standard way to deal with such situations?

Is there no such thing that can be handled (and should be) with supervisor pattern? That is, B should listen to events that affect its effect, in this situation the condition of A.

A master for a cash cache is a natural abstraction and it is that Oracle concurrence and terracotta do this, with restraint, with whom I am more familiar, usually to listen to cash events for specific nodes or The mechanism is there. This is probably what you should emulate.

You will also want to see the document for any of them, even if it is a guide or a source of ideas.

You say that which platform you are running, but perhaps we can recommend some options to rolling ourselves, which is always going to be full of problems, especially the form of cash With some complex (no fault: cache is complicated)


Comments