Modifying the Caching Application Block

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

The Caching Application Block was designed to be used in a variety of applications and to be a general-purpose cache. Extension points enable you to adapt the application block to the requirements of any particular application. However, if you want to add new features to the application block, you can do so by modifying the source code (the installer includes both the source code and the binaries). In this case, follow the recommendations in this topic.

Recommendations for Modifying the Caching Application Block

When modifying the source code, follow these best practices:

  • Make sure that you understand how the application block works by reading the Design of the Caching Application Block section of this documentation.
  • Consider changing the Caching Application Block's namespace if you change the code significantly or want to use your customized version of the application block together with the original version. Note that changing the application block's namespace requires you to change the namespace of all other application blocks and applications that use the Caching Application Block.
  • Use strong naming. A strong name enables the assembly to be uniquely identified, versioned, and checked for integrity. You will have to generate your own key pair to sign your modified version of the application block. For more information, see Strong-Named Assemblies and Versioning Tutorial. Alternatively, you can choose to not sign your custom version. This is referred to as weak naming.
  • You must recompile your code for your modifications to take effect.
Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.