Table of Contents

Interface IAppsCache

Namespace
ToSic.Eav.Caching
Assembly
ToSic.Eav.Core.dll

Marks the objects which are responsible for caching IAppStateCache in memory.
This is a very powerful system ensuring performance and more.

[InternalApi_DoNotUse_MayChangeWithoutNotice("this is just fyi")]
public interface IAppsCache

Methods

Get(IAppIdentity, IAppLoaderTools)

Retrieve an app from the cache or build it if not yet available.

IAppStateCache Get(IAppIdentity app, IAppLoaderTools tools)

Parameters

app IAppIdentity

App identifier.

tools IAppLoaderTools

Current service provider, in case the app must be retrieved / generated

Returns

IAppStateCache

The IAppStateCache of the app.

Has(IAppIdentity)

Check if something is already in the cache

bool Has(IAppIdentity app)

Parameters

app IAppIdentity

App identifier.

Returns

bool

Load(IAppIdentity, string, IAppLoaderTools)

Load an app into cache, specifying the primary language. This is used in scenarios, where the primary language cannot be auto-detected, so it's set explicitly.

void Load(IAppIdentity app, string primaryLanguage, IAppLoaderTools tools)

Parameters

app IAppIdentity

App identifier.

primaryLanguage string

Primary language, lower case.

tools IAppLoaderTools

Purge(IAppIdentity)

Clean cache for specific Zone and App

void Purge(IAppIdentity app)

Parameters

app IAppIdentity

PurgeZones()

Clean entire global cache, which includes the List of Zones and Apps as well as all the apps.

void PurgeZones()

Update(IAppIdentity, IEnumerable<int>, ILog, IAppLoaderTools)

Tell the cache that an app has done a partial update. Only relevant for farm scenarios, where other nodes must be informed.

IAppStateCache Update(IAppIdentity app, IEnumerable<int> entities, ILog log, IAppLoaderTools tools)

Parameters

app IAppIdentity

App identifier.

entities IEnumerable<int>

List of entities which need to be updates.

log ILog

Log object to log what's happening.

tools IAppLoaderTools

Returns

IAppStateCache

The updated IAppStateCache or null, if it wasn't in the cache so didn't need updating.