Interface IDataCacheContext


  • public interface IDataCacheContext

    Runtime context for clients to access data caches in its scope. This is used for accessing the data caching framework within the ivy variable in IvyScript snippets

    The framework offers caching on three different scopes in whose context the data cache groups and entries are valid. Furthermore, the life cycle of data cache groups and entries is bound to their life cycle. The scopes are the application, the environment and the session.

    Application wide caching represents some sort of global cache, its content is valid for the whole application and the same for all actors within the application.

    Environment scope should be used when data source is dependent from the tenant. In ivy if Tenant A has his data in data source A and Tenant B in data source B, then the sources are stored in one environment per tenant and the data should be cached per tenant i.e. per environment.

    Session scope binds cached data to the user session, i.e. it is valid from the first user request and is at latest invalidated when the user logs off or an inactivation time out is hit. This is the right spot to cache data corresponding to the current interaction or corresponding the user that is logged in

    Since:
    16.09.2008
    API:
    This is a public API.
    • Method Detail

      • getSessionCache

        IDataCache getSessionCache()
        Returns the cache for the current client session
        Returns:
        the session cache
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • getAppCache

        IDataCache getAppCache()
        Returns the data cache for the current application
        Returns:
        the current application data cache
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.
      • getEnvironmentCache

        IDataCache getEnvironmentCache()
        Returns the data cache for the current environment
        Returns:
        the current environment cache
        API:
        This public API is available in IvyScript and Java. It has the visibility NOVICE.