• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

Clear Cache

Clearing the cache is a critical administrative task for emptying distributed data and resetting the cache state without removing the cache configuration. NCache provides two primary methods to clear the cache contents: a GUI-based approach via the NCache Management Center and an automated approach using PowerShell. This process effectively removes all items from the specified cache, ensuring a fresh environment for testing or data synchronization.

Method 1: Clear Cache via NCache Management Center (GUI)

  • Launch the NCache Management Center by browsing to http://localhost:8251 or <server-ip>:8251.

  • In the left navigation bar, click on Local Caches or Clustered Caches based on the cache to be cleared. This opens a new page. It shows any existing local or clustered caches and additional details like Server and Server Platform.

An image of the Clustered Caches tab in the NCache Management Center showing a stopped Partition-Replica Distributed Cache called demoCache.

  • Click on the "..." button against the cache name.

  • Click on Clear Contents from the options.

An image of the dropdown menu for managing a cache available on the Clustered Caches tab in the NCache Management Center.

  • A message will be displayed on the screen when clearing cache contents.

An image of the success message that appears as a result of clearing the cache using NCache Management Center.

  • On successful cache clear, a notification will confirm that the cache has been cleared.

Method 2: Clear Cache Using PowerShell

  • The Clear Cache cmdlet enables the user to clear the cache by removing all items currently present. The following command clears the items present in the cache named demoCache forcefully.
Clear-Cache -Name demoCache -ForceClear
  • The following command forcefully clears the cache and does not confirm with the user before clearing the cache.
Clear-Cache -Name demoCache -Force
  • You can also clear JavaScript or CSS content from the cache by using the following command.
Clear-Cache -Name demoCache -ClearJSS
  • To clear a specific cache in a cluster you can execute the following command.
Clear-Cache -Name demoCache -Server 20.200.20.11
  • If the user has configured security the folloiwng comand will confirm from user wethere they want to to proceed using security credentials.
Clear-Cache -Name demoCache -Credentials(Get-Credential john_smith)

See Also

Create a Cache
Remove Cache
Add Server Node

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top