Interface IAppsCache
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
IAppIdentityApp identifier.
tools
IAppLoaderToolsCurrent 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
IAppIdentityApp identifier.
Returns
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
IAppIdentityApp identifier.
primaryLanguage
stringPrimary 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
IAppIdentityApp identifier.
entities
IEnumerable<int>List of entities which need to be updates.
log
ILogLog 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.