Cache Manager plug-in for ASP.NET
- Download Cache Manager v1.0.60115.01
Cache Manager Screenshots
Current Version: 1.0.60115.01
Version Date: 15 January 2006
By Steven Smith (http://aspadvice.com/blogs/ssmith/)
Overview
Cache Manager is an ASP.NET plug-in which can be added to any ASP.NET website with
no code, no recompile, a single DLL, and a single entry in web.config. It allows
web administrators to monitor and manage the ASP.NET Cache object for their ASP.NET
applications.
License Agreement
Installation Instructions
- Copy AspAlliance.CacheManager.dll to your application's /bin folder.
- Modify your web.config to include an <httpHandlers> section with the following
<add /> element:
<add verb="*" path="CacheManager.axd" type="AspAlliance.CacheManager.CacheManagerPageFactory,AspAlliance.CacheManager"
/>
See the included sample web.config file for placement of the section within your
configuration schema.
- (optional - recommended) For increased security, change the path from "CacheManager.axd"
to something less guessable by your users.
- (optional - recommended) For increased security, add a <location>
element to your web.config and configure role-based authorization. See the sample
web.config for details. If you changed the path of your implementation in Step 3,
be sure to use the same path here. You must be <authorization> enabled
for this to work.
- (optional - required for subwebs) If you configure CacheManager (or any other
HttpHandler) in a root web application, any subwebs (sub folders marked as applications
in IIS) will need a copy of the DLL in their /bin folder. Simply drop a copy of
AspAlliance.CacheManager into each subweb's /bin folder. Alternately, you may place
AspAlliance.CacheManager in the Global Assembly Cache (GAC). For more information,
see Installing an Assembly in GAC.
Usage Instructions
Once installation is complete, simply navigate to your website and go to the path
you configured in Step 2 (or 3) of installation. For a default installation this
will be something like http://yourdomain.com/yourweb/CacheManager.axd. You should
see the default Cache Manager application home page. From here you should see a
menu on the left and Cache Stats on the right. The menu includes options to Clear
Application Cache, View Cache Entries, and Remove Page Output Cache. The stats on
the right should show your Server Name, Svr Free Mem MB (Server Free Memory in MegaBytes),
App Path (Application Path), and App Cache Entries (Application Cache API Entries).
Note that the App Cache Entries do not include system level cached objects including
output caching. The menu options are described below.
Home: Returns you to the application home page.
Clear Application Cache: Clears all Cache API cache entries. Will not remove
output cached pages and controls unless these depend on an entry in the cache. For
more on how to configure this, see Remove ASP.NET
Page Output Cache Entries (http://aspalliance.com/668).
View Cache Entries: Shows a table listing all current entries in the Cache
API, including the item's data type. For some types, includes the ability to view
the contents of the item. Also includes the option to delete individual cache entries.
Remove Page Output Cache: Allows you to specify a page via its relative url
(from the server root). For example, to remove the default.aspx output cache in
the root of the site, you would specify "/default.aspx" without the quotes. If you
specify a page that does not exist or which does not use output caching, no error
will occur. At present, I do not know of a way to list out all pages that have Output
Caching enabled -- if I figure that out it may appear in a future version.
Cache Stats
These should be largely self-explanatory. Note that the Server Free Memory stat
is only available if your account has the necessary permissions, so it will read
"Error" under most locked-down installs. Configure impersonation or grant the account
you're using for your Application Domain rights to the performance counters and
you will see the true value.
Support
- This page (http://aspalliance.com/cachemanager/) should be your first option. It
will include FAQ items when there are some and a link to the support forums.
- Support Forum at ASP Advice:
Cache Manager Forum
- Alternately, contact me via my blog
(http://aspadvice.com/blogs/ssmith/).
Credits - Do not remove
I referred a lot to prior work available online. The single largest influence on
this application was the ELMAH (Error
Logging Module and Handler) application, available on GotDotNet (http://workspaces.gotdotnet.com/elmah).
I also looked at the
CacheView application on CodeProject (http://www.codeproject.com/aspnet/exploresessionandcache.asp)
and took some ideas from it, and I referred to
BlueRobot.com for the basis of the CSS layout (http://www.bluerobot.com/web/layouts/layout3.html).
I had some additional help on the layout from
James Crowley (http://developerfusion.co.uk/) and
Steven Swafford (http://aspadvice.com/blogs/sswafford/).