Click or drag to resize

CacheSetInt Method (String, Int32, Double, Double)

Save an integer value in the cache with the given name and time to live, restricting maximum call frequency to the range 2 to 1000 calls per second if required.

Namespace:  ASCOM.Utilities
Assembly:  ASCOM.Cache (in ASCOM.Cache.dll) Version: 3c9121baba46811fe6e53a58a05935662261416d
Syntax
public void SetInt(
	string Key,
	int Value,
	double CacheTime,
	double MaximumCallFrequency
)

Parameters

Key
Type: SystemString
Name of this item in the cache. The key is case sensitive.
Value
Type: SystemInt32
Integer value to be stored in the cache.
CacheTime
Type: SystemDouble
Time in seconds before the item will be automatically removed from the cache.
MaximumCallFrequency
Type: SystemDouble
Maximum number of set calls per second that are to be allowed for this item. A value of 0.0 will disable throttling. See Dispose for further information.
Exceptions
ExceptionCondition
InvalidValueExceptionWhen Key is null or empty.
InvalidValueExceptionWhen CacheTime is negative.
InvalidValueExceptionWhen MaximumCallFrequency is not 0.0 and is outside the range 2.0 to 1000.0.
Remarks
Any existing item in the cache with the same name will be overwritten.
See Also