Cache in SBS

Version 7

    1. How cache works

        Actually the cache is a Map object. For example, to the doucment cache. The key is the doucment ID.
    The value is the the Document Object. When the user get the doucment object by the doucment ID, first
    the sbs tries to get the doucment from the doucment cache if not find, then get the document from the
    database and store the document object into the document cache. Because the cached content is in the
    memory,  when get the object from the cache, the user will feel that the speed is so fast.
        Even more, the cache is managed by Oracle coherence.  For the application developer,  the properites of
    the cache can be configured through coherence-cache-config.xml.
         Below I will explain several properties.
    The back-size-high parameter defines the maximum size in bytes for the cache.
    When the cache tries to exceed that size, content from the cache will be removed and it will try to go to the size defined by the back-size-low parameter.
    The back-expiry parameter defines the time a content can stay in the cache before it is removed.
    The expiration time can be defined in minutes (e.g. 30m) or in hours (e.g. 2h) or in days (e.g. 2d).
    Using a value of zero in any of these parameters is a way to set no limit or expiration time.
    back-expiry can be 1s, 1m, 1h, 1d.
    2. How to implement in the widget development
        There is a thread that discusses how to use cache in the widget.
    3. How to check the cache work well or not
        admin console --> system-->Settings-->Caches