Registering Non-Generic Classes [Deprecated]
NCache enables you to register non-generic classes for Compact Serialization to reduce the memory consumption for cached objects and optimize network bandwidth consumption during data transfer. By utilizing a specialized binary serialization format, NCache eliminates the overhead of standard .NET/Java serialization. While this specific manual registration is [Deprecated], it remains a core configuration for legacy systems requiring precise control over object-to-binary mapping in distributed clusters.
Important
For .NET, before deploying your .dll files, ensure you have the appropriate .NET Version installed as discussed in the NCache Installation Guide.
How to Register Compact Types via NCache Management Center
Launch the NCache Management Center by browsing to http://localhost:8251 or
<server-ip>:8251.In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to configure.
Against the cache name, click on View Details.
- This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Compact Serialization in the left bar.

Click the Add Type button, and a new Select Compact Classes page will open.
Against Library, click on Browse and select the required file which contains the classes. The classes will be listed from the selected assembly in the Loaded Classes list box.
Select the desired class, which you want to register with NCache for Compact Serialization, and click Add Classes.

- Click OK to add class. It lists fully qualified name of the selected class in the Compact Serialization tab.

- Click on Save Changes to apply this configuration to the cache.
Registering Non-Generic Classes via PowerShell or CLI
The Add-CompactType tool enables the user to register a custom object for Compact Serialization for the given caches. This command defines a compact type for demoCache. You can define further types one by one repeating the step for other types.
Add-CompactType -CacheName demoCache -AssemblyPath C:\Data.dll -Class Alachisoft.NCache.Sample.Data.Customer
See Also
Unregister Non-Generic Classes
Register Generic Classes
Register Generic Classes Using Generic Type Handler
Register Classes for Portable Data Sharing