Class AppsCacheBase
The Apps Cache is the main cache for App States.
This is just the abstract base implementation.
The real cache must implement this and also provide platform specific adjustments so that the caching is in sync with the Environment.
[InternalApi_DoNotUse_MayChangeWithoutNotice("this is just fyi")]
public abstract class AppsCacheBase : IAppsCache, IHasIdentityNameId
- Inheritance
-
AppsCacheBase
- Implements
Properties
NameId
Primary identifier of an object which has this property. It will be unique and used as an ID where needed.
public virtual string NameId { get; }
Property Value
Priority
public virtual int Priority { get; }
Property Value
Methods
Get(IAppIdentity, IAppLoaderTools)
Retrieve an app from the cache or build it if not yet available.
public 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
public bool Has(IAppIdentity app)
Parameters
app
IAppIdentityApp identifier.
Returns
IsViable()
public virtual bool IsViable()
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.
public 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
public 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.
public abstract 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.
public virtual IAppStateCache Update(IAppIdentity appIdentity, IEnumerable<int> entities, ILog log, IAppLoaderTools tools)
Parameters
appIdentity
IAppIdentityentities
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.
Zones(IAppLoaderTools)
public abstract IReadOnlyDictionary<int, Zone> Zones(IAppLoaderTools tools)
Parameters
tools
IAppLoaderTools