CacheGet(String, Double) Method

Retrieve an object from the cache with the given name, restricting maximum call frequency to the range 2 to 1000 calls per second if required.

Definition

Namespace: ASCOM.Utilities
Assembly: ASCOM.Cache (in ASCOM.Cache.dll) Version: 7.1.3+4851.c5da65c2b
C#
public Object Get(
	string Key,
	double MaximumCallFrequency
)

Parameters

Key  String
Name of this item in the cache. The key is case sensitive.
MaximumCallFrequency  Double
Maximum number of retrievals per second that are to be allowed for this item. A value of 0.0 will disable throttling. See Dispose for further information.

Return Value

Object
The requested object if present in the cache or a "NotInCacheException" if there is no item in the cache that has the supplied name.

Exceptions

InvalidValueExceptionWhen Key is null or empty.
InvalidValueExceptionWhen MaximumCallFrequency is not 0.0 and is outside the range 2.0 to 1000.0.
NotInCacheExceptionWhen there is no item in the cache with the supplied key.

See Also