Interface PageCachedValueService

  • All Known Implementing Classes:
    MarkdownSlingCacheImpl

    public interface PageCachedValueService
    Service to cache some values that depend on a page content but are computationally intensive to calculate, like the markdown representation or embeddings or a machine generated summary. The values are not stored in the page itself but in a separate tree at a location that is configurable.
    • Method Detail

      • putPageCachedValue

        void putPageCachedValue​(@Nonnull
                                String propertyName,
                                @Nonnull
                                org.apache.sling.api.resource.Resource resource,
                                @Nonnull
                                String value)
        Writes a value that should be cached with that property name to the cache.
      • getPageCachedValue

        @Nullable
        String getPageCachedValue​(@Nonnull
                                  String propertyName,
                                  @Nonnull
                                  org.apache.sling.api.resource.Resource resource)
        Reads a value that was cached with that property name from the cache.