Interface ICacheMultiDataProvider<T>

  • Type Parameters:
    T - the type of the value in the cache.
    All Known Implementing Classes:
    SingleOrBulkLoadCacheDataProvider, URLRedirectCacheMultiValueProvider

    public interface ICacheMultiDataProvider<T>
    A cache data provider that may return multiple data during a load request.
    Since:
    10.0.0
    Version:
    $Revision: 19766 $ $Date: 2017-01-05 18:35:09 -0200 (Thu, 05 Jan 2017) $
    • Method Detail

      • loadData

        java.util.Collection<CacheItem<T>> loadData​(ICacheMultiDataProvider.IRequest request)
                                             throws PortalException
        Returns the data to be loaded into the cache.
        Parameters:
        request - a request object containing information about the requested data.
        Returns:
        a collection of cache items to be cached. If a cache item for the requested key is not present in the returned collection, it will be assumed its value is getDefaultValue().
        Throws:
        PortalException
        Since:
        10.0.0
      • getDefaultValue

        default T getDefaultValue()
        The value to use for requested keys not returned by loadData(IRequest).
        Returns:
        the value.
        Since:
        10.0.0