How do you use the page output caching?

Mar 31, 2008 at 5:34 PM
Edited Mar 31, 2008 at 6:42 PM
Hello,

Thanks for working on this. I was trying to play around with the page output caching.

When I added:
<add name="MemcachedModule" type="MemcachedProviders.Util.MemcachedModule, MemcachedProviders" />

to the httpModules section in the config, my project starts, but doesn't work right. I can't log in properly (get past the log in page).

How exactly does it work as in,
-how do you tell it to cache a particular page?
-how long will it cache it for?

Thank you
Coordinator
Apr 1, 2008 at 2:14 AM
Edited Apr 1, 2008 at 2:22 AM
This article describes how to setup up a asp.net page to cache
How to: Set the Cacheability of an ASP.NET Page Declaratively

In the web.config file you need to setup enyims client config section.
<configSections>
<sectionGroup name="enyim.com">
<section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
</sectionGroup>
</configSections>

<enyim.com>
<memcached>
<servers>
<!-- put your own server(s) here-->
<add address="127.0.0.1" port="11211" />
</servers>
<socketPool minPoolSize="10" maxPoolSize="100"
connectionTimeout="00:00:10" deadTimeout="00:02:00" />
</memcached>
</enyim.com>

then setup
<add name="MemcachedModule" type="MemcachedProviders.Util.MemcachedModule, MemcachedProviders" />


Apr 2, 2008 at 5:10 PM


fahadaz wrote:
This article describes how to setup up a asp.net page to cache
How to: Set the Cacheability of an ASP.NET Page Declaratively

In the web.config file you need to setup enyims client config section.
<configSections>
<sectionGroup name="enyim.com">
<section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
</sectionGroup>
</configSections>

<enyim.com>
<memcached>
<servers>
<!-- put your own server(s) here-->
<add address="127.0.0.1" port="11211" />
</servers>
<socketPool minPoolSize="10" maxPoolSize="100"
connectionTimeout="00:00:10" deadTimeout="00:02:00" />
</memcached>
</enyim.com>

then setup
<add name="MemcachedModule" type="MemcachedProviders.Util.MemcachedModule, MemcachedProviders" />





No idea why, but when I add that line to the httpModules section, I can't login to my project. I don't have any page caching specified. I am using Memcached in other parts of the project and it works perfectly fine.

<httpModules>
<add name="MemcachedModule" type="MemcachedProviders.Util.MemcachedModule, MemcachedProviders" />
</httpModules>

As soon as I remove the line, everthing works great again.

Thanks
Coordinator
Apr 2, 2008 at 6:40 PM
I will try to re-produce the same issue by using the HttpModule in a website that use forms authentication.
Coordinator
Apr 7, 2008 at 1:36 AM
Edited Apr 7, 2008 at 1:36 AM
There is a bug in the module. It clears furthur event processing. I will be posting a fix soon.
Coordinator
Apr 7, 2008 at 2:02 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.