• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Add Test Data to Cache

Add-TestData cmdlet enables the user to add some test data to the cache to check if the cache has started and is working properly. By default this data expires after the time interval of 300 seconds. The item size can be specified by the user.

Add-TestData [-CacheName] [-AbsoluteExpiration] [-DataSize] [-ItemCount] [-NoLogo]

These properties are explained in detail in the Properties section.

Examples

  • This command adds test data to the cache named demoCache. It adds 10 items to the cache since no item count is specified. The data added will expire after the time duration of 5 minutes. Rest of the settings are set as default.
Add-TestData –CacheName demoCache
  • This command adds test data to the cache named demoCache. It adds 100 items to the cache and the data added will expire after the time duration of 5 minutes. Rest of the settings are set as default.
Add-TestData –CacheName demoCache –ItemCount 100
  • This command adds test data to the cache named demoCache. It adds 100 items to the cache and the size of each item will be 2KB. The Absolute Expiration is set as 200 seconds to the data iterms.
Add-TestData demoCache –ItemCount 100 –DataSize 2048 AbsoluteExpiration 200

Properties

Note: The parameters with asterisk (*) on their names are the required parameters and the rest are optional.

Parameters Data Types Description Default Value
-CacheName* <String> Specifies the name of the Cache to which test data will be added. -
-ItemCount <Long> Specifies the number of test items to be added to the Cache. 10
-DataSize <Long> Specifies the size of each item to be added to the cache. 1k (1024 bytes)
-AbsoluteExpiration <Double> Specifies the time in seconds for the Absolute expiration of the test data items. Its minimum value is 15 seconds. 300 seconds
-NoLogo <SwitchParameter> Suppresses display of the logo banner. False

See Also

Set Up PowerShell Environment
Clear-Cache
Export-CacheConfiguration

Back to top Copyright © 2017 Alachisoft