Interface IPackageCacheManager
The interface for a class that caches packages for a device.
Namespace: Phoenix.Applications
Assembly: Phoenix.Abstractions.Applications.dll
Syntax
public interface IPackageCacheManager
Methods
View SourceForceCacheRefresh(IDevice)
Forces the cache to reset for the device.
Declaration
Task ForceCacheRefresh(IDevice device)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The target device. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task which performs the reset. |
GetMaxAge(IDevice)
Gets the internal max cache age for a device's packages.
Declaration
TimeSpan GetMaxAge(IDevice device)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The target device. |
Returns
Type | Description |
---|---|
System.TimeSpan | The max cache age. |
GetPackagesAsync(IDevice)
Gets the packages for a specific device, refreshing the cache if the packages are older than the internal max cache age.
Declaration
Task<IList<IPackage>> GetPackagesAsync(IDevice device)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The target device. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<IPackage>> | The packages for that device. |
GetPackagesAsync(IDevice, PackageFilter)
Gets a filtered set of packages for a specific device, refreshing the cache if the packages are older than the internal max cache age.
Declaration
Task<IList<IPackage>> GetPackagesAsync(IDevice device, PackageFilter filter)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The target device. |
PackageFilter | filter | The filter to apply. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<IPackage>> | The packages for that device. |
GetPackagesAsync(IDevice, PackageFilter, TimeSpan)
Gets a filtered set of packages for a specific device, refreshing the cache if the packages are older than the supplied max cache age.
Declaration
Task<IList<IPackage>> GetPackagesAsync(IDevice device, PackageFilter filter, TimeSpan maxCacheAge)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device to get the packages for. |
PackageFilter | filter | The filter to apply. |
System.TimeSpan | maxCacheAge | The maximum cache age. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<IPackage>> | The packages for that device. |
GetPackagesAsync(IDevice, TimeSpan)
Gets the packages for a specific device, refreshing the cache if the packages are older than the supplied max cache age.
Declaration
Task<IList<IPackage>> GetPackagesAsync(IDevice device, TimeSpan maxCacheAge)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device to get the packages for. |
System.TimeSpan | maxCacheAge | The maximum cache age. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<IPackage>> | The packages for that device. |
SetMaxAge(IDevice, TimeSpan)
Sets the max age for a device's packages.
Declaration
void SetMaxAge(IDevice device, TimeSpan maxAge)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The target device. |
System.TimeSpan | maxAge | The maximum age. |