A flexible caching system for .NET: MelCache

MelCache is a caching system for .NET I wrote some time ago in C#. It is very easy to use and allows you to cache arbitrary data (byte[]) with a key (string) and an expiry date. You can also compress the cached data using GZip or BZip2 (uses the #ziplib library). Cached data can be retrieved later if it has not yet expired. The caching system creates binary files which are used to store the cached data (by default 5 MB) and an XML index file. New cache files are created if needed. This is done to reduce hard drive fragmentation when caching small files. Cached files can also be deleted from the cache at any time. It is especially useful to cache files your application downloads from the Internet. Note: MelCache has nothing to do with ASP.NET or ASP.NET’s caching capabilities (however, it should work with ASP.NET, too).

The MelCache DLL (Melaxis.MelCache.dll) is signed with a strong name and can be installed in the GAC. It requires ICSharpCode.SharpZipLib.dll (included in the ZIP file).

Download MelCache (Documentation included)

You can use MelCache in freeware and open source projects without restriction. Please contact me if you want to use it otherwise. If you find any bugs in MelCache or if you have an idea how it could be improved, please leave a comment.

Comments are closed.