• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
Show / Hide Table of Contents

New-ClientCache - PowerShell Cmdlet

This PowerShell cmdlet enables the user to create a new Client Cache on the specified server. The user can specify the eviction policy, type of Client Cache i.e., Full-Data or Regular, and create InProc or OutProc cache as part of this PowerShell cmdlet.

Note

This feature is only available in NCache Enterprise.

  • Windows PowerShell
  • Linux CLI
New-ClientCache -CacheName -ClientNode [-Size] [-Type] [-CleanupInterval] [-ClientCacheName] [-DefaultPriority] [-EvictionPolicy] [-InProc] [-NoLogo] [-Optimistic] [-Path] [-Port] [-EvictionRatio] -Server [-UpdateServerConfig] [-FailQueryOnPartialDataset] [-DisableL2FallbackOnMiss] [-Credentials] 

Examples of New-ClientCache - PowerShell Cmdlet

  • This command creates a Regular Client Cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache on server 20.200.20.11 having size 1024 MB. If the Type parameter is not specified, a Regular Client Cache will be created by default.
New-ClientCache -CacheName demoCache -ClientCacheName demoClientCache -Server 20.200.20.11 -Size 1024 -ClientNode 20.200.20.12
  • This command creates a Full-Data Client Cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache on server 20.200.20.11 having size 1024 MB.
New-ClientCache -CacheName demoCache -ClientCacheName demoClientCache -Type FullData -Server 20.200.20.11 -Size 1024 -ClientNode 20.200.20.12
  • This command creates a Regular Client Cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache on server 20.200.20.11.
New-ClientCache -CacheName demoCache -ClientCacheName demoClientCache -Type Regular -Server 20.200.20.11 -ClientNode 20.200.20.12 -Path C:\config.xml
  • This command creates a Full-Data Client Cache named demoClientCache on the client node 20.200.20.12, linked to a clustered cache hosted on the server 20.200.20.11. The client cache is configured with 1024 MB of memory, and uses optimistic synchronization mode. The FailQueryOnPartialDataset switch parameter enforces Strict Query Enforcement and throws an exception if a query is executed on a partially loaded dataset, with no fallback to the clustered cache. The DisableL2FallbackOnMiss switch parameter enforces Strict Local Reads and returns a cache miss for any key not found in the client cache, without attempting to retrieve it from the clustered cache.
New-ClientCache -CacheName demoCache -ClientCacheName demoClientCache -Type FullData -Server 20.200.20.11 -Size 1024 -ClientNode 20.200.20.12 -Optimistic -FailQueryOnPartialDataset -DisableL2FallbackOnMiss
  • This command creates a Regular Client Cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache on server 20.200.20.11 having size 1024 MB for simple case using security credentials.
New-ClientCache -CacheName demoCache -ClientCacheName demoClientCache -Server 20.200.20.11 -Size 1024 -ClientNode 20.200.20.12 -Credentials (Get-Credential john_smith)

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 clustered cache name. A clustered cache must be specified for creating a Client Cache. -
-ClientNode* <String> Specifies a client node which is registered with the cluster cache. -
-Size <Long> Specifies the size of the cache that is allocated to the newly created Client Cache. 1024 MB
-Type <String> Specifies the type of the Client Cache. The possible values are:
  • Regular
  • FullData
  • Regular
    -CleanupInterval <Integer> Specifies the time interval (in seconds) after which the cache cleanup is called. 15 seconds
    -ClientCacheName* <String> Specifies the name or id of the new Client Cache to be created. -
    -DefaultPriority <String> If the eviction policy opted by the user is Priority based, this parameter specifies the default priority. Possible values are:
  • High
  • Above Normal
  • Normal
  • Below Normal
  • Low
  • Normal
    -EvictionPolicy <String> Specifies the eviction policy for cache items. Cached items will be cleared from the cache according to the specified policy, if the cache reaches its limit. Possible values are:
  • Priority
  • LFU
  • LRU
  • LRU
    -InProc <SwitchParameter> Specifies if the Client Cache needs to be InProc or OutProc. If not specified the Client Cache will be OutProc by default. OutProc
    -NoLogo <SwitchParameter> Suppresses display of the logo banner. False
    -Optimistic <SwitchParameter> Specifies optimistic Client Cache synchronization mode to be enabled. -
    -Path <String> Specifies the path of the cache configuration file which will be configured. -
    -Port <Integer> Specifies the server port where NCache Service is listening. 8250
    -EvictionRatio <Decimal> Specifies the eviction ratio (in percentage) for cache items. Cached items will be cleared from the cache according to the specified ratio if the cache reaches its limit. 5%
    -Server* <String> Specifies the clustered cache that the client cache is associated with. -
    -UpdateServerConfig <SwitchParameter> Specifies whether to update the client-node sections of server node of the specified cluster in the configuration (config) file. It is useful when cluster nodes and client nodes are in different networks. True
    -FailQueryOnPartialDataset <SwitchParameter> Throws an exception when querying a partially loaded dataset in the Full-Data Client Cache, with no fallback to the clustered cache. -
    -DisableL2FallbackOnMiss <SwitchParameter> Returns a cache miss for any key not found in the Client Cache, with no fallback to the clustered cache. -
    -Credentials <pscredential> Specifies the user credentials used to authorize the user for this operation. It is required in case security is enabled on cache server. The password must be the same as the active directory user password. The user id must be the same as the active directory userid. -
    new-clientcache -cachename -clientnode [-size] [-type] [-cleanupinterval] [-clientcachename] [-defaultpriority] [-evictionpolicy] [-inproc] [-nologo] [-optimistic] [-path] [-port] [-evictionratio] -server [-updateserverconfig] [-failqueryonpartialdataset] [-disablel2fallbackonmiss] [-userid] [-password]
    

    Examples of New-ClientCache - PowerShell Cmdlet

    • This command creates a Regular Client Cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache on server 20.200.20.11 having size 1024 MB. If the type parameter is not specified, a Regular Client Cache will be created by default.
    new-clientcache -cachename demoCache -clientcachename demoClientCache -server 20.200.20.11 -size 1024 -clientnode 20.200.20.12
    
    • This command creates a Full-Data Client Cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache on server 20.200.20.11 having size 1024 MB.
    new-clientcache -cachename demoCache -clientcachename demoClientCache -type FullData -server 20.200.20.11 -size 1024 -clientnode 20.200.20.12
    
    • This command creates a Regular Client Cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache on server 20.200.20.11.
    new-clientcache -cachename demoCache -clientcachename demoClientCache -type Regular -server 20.200.20.11 -clientnode 20.200.20.12 -path C:\config.xml
    
    • This command creates a Full-Data Client Cache named demoClientCache on the client node 20.200.20.12, linked to a clustered cache hosted on the server 20.200.20.11. The client cache is configured with 1024 MB of memory, and uses optimistic synchronization mode. The failqueryonpartialdataset switch parameter enforces Strict Query Enforcement and throws an exception if a query is executed on a partially loaded dataset, with no fallback to the clustered cache. The disablel2fallbackonmiss switch parameter enforces Strict Local Reads and returns a cache miss for any key not found in the client cache, without attempting to retrieve it from the clustered cache.
    new-clientcache -cachename demoCache -clientcachecame demoClientCache -type fulldata -server 20.200.20.11 -size 1024 -clientnode 20.200.20.12 -optimistic -failqueryonpartialdataset -disablel2fallbackonmiss
    
    • This command creates a Regular Client Cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache on server 20.200.20.11 having size 1024 MB using security credentials.
    new-clientcache -cachename demoCache -clientcachename demoClientCache -server 20.200.20.11 -size 1024 -clientnode 20.200.20.12 -userid john_smith -password pass123
    

    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 clustered cache name. A clustered cache must be specified for creating a Client Cache. -
    -clientnode* <String> Specifies a client node which is registered with the cluster cache. -
    -size <Long> Specifies the size of the cache that is allocated to the newly created Client Cache . 1024 MB
    -type <String> Specifies the type of the Client Cache. The possible values are:
  • Regular
  • FullData
  • Regular
    -cleanupinterval <Integer> Specifies the time interval (in seconds) after which the cache cleanup is called. 15 seconds
    -clientcachename* <String> Specifies the name or id of the new Client Cache to be created. -
    -defaultpriority <String> If the eviction policy opted by the user is Priority based, this parameter specifies the default priority. Possible values are:
  • High
  • Above Normal
  • Normal
  • Below Normal
  • Low
  • Normal
    -evictionpolicy <String> Specifies the eviction policy for cache items. Cached items will be cleared from the cache according to the specified policy, if the cache reaches its limit. Possible values are:
  • Priority
  • LFU
  • LRU
  • LRU
    -inproc <SwitchParameter> Specifies if the Client Cache needs to be InProc or OutProc. If not specified the Client Cache will be OutProc by default. OutProc
    -nologo <SwitchParameter> Suppresses display of the logo banner. False
    -optimistic <SwitchParameter> Specified by the user if optimistic Client Cache synchronization mode is to be enabled. -
    -path <String> Specifies the path of the cache configuration file which will be configured. -
    -port <Integer> Specifies the server port where NCache Service is listening. 8250
    -evictionratio <Decimal> Specifies the eviction ratio (in percentage) for cache items. Cached items will be cleared from the cache according to the specified ratio if the cache reaches its limit. 5%
    -Server* <String> Specifies the clustered cache that the client cache is associated with. -
    -updateserverconfig <SwitchParameter> Specifies whether to update the client-node sections of server node of the specified cluster in the configuration (config) file. It is useful when cluster nodes and client nodes are in different networks. True
    -failqueryonpartialdataset <SwitchParameter> Throws an exception when querying a partially loaded dataset in the Full-Data Client Cache, with no fallback to the clustered cache. -
    -disablel2fallbackonmiss <SwitchParameter> Returns a cache miss for any key not found in the Client Cache, with no fallback to the clustered cache. -
    -userid <String> Specifies the user id used to authorize the user for this operation. It is required in case security is enabled on cache server. This user id must be the active directory user id. -
    -password <String> Specifies the password of the user that is used to authorize the user for this operation. It is required in case security is enabled on cache server. This password must be the same as the active directory user password. -
    In This Article
    • Examples of New-ClientCache - PowerShell Cmdlet
    • Properties
    • Examples of New-ClientCache - PowerShell Cmdlet
    • Properties

    Contact Us

    PHONE

    +1 (214) 764-6933   (US)

    +44 20 7993 8327   (UK)

     
    EMAIL

    sales@alachisoft.com

    support@alachisoft.com

    NCache
    • NCache Enterprise
    • NCache Professional
    • 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 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
    Back to top