Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to disable/enable cache between dev and production environment

Reply
Thread Tools

How to disable/enable cache between dev and production environment

 
 
RedHair
Guest
Posts: n/a
 
      11-15-2006
Development: Windows 2003
Production :Windows 2003
ASP.NET 2.0 + C#

I want to disable the cache feature of all pages in dev but enable it in
production environments.
What's the solution?
If uses cacheProfiles in web.config then I need to deploy different
web.config files from dev
to production sites.

Thanks


 
Reply With Quote
 
 
 
 
kferron
Guest
Posts: n/a
 
      11-15-2006
Well first let me say that in most cases, the web.config in a dev
environment and a production environment will need to be different.

Second.. what "cache feature" are you speaking of? Theres a number of
different contexts in which things are being cached, and you as the
developer have control of.

You may want to look into preprocessor directives if you're talking
about actually disabling calls to caching specific code that you've
implemented.

(You should also consider the fact that you would really need to be
able to build with caching in dev also, in cases where you are dealing
with and debugging logic related to caching.)



RedHair wrote:
> Development: Windows 2003
> Production :Windows 2003
> ASP.NET 2.0 + C#
>
> I want to disable the cache feature of all pages in dev but enable it in
> production environments.
> What's the solution?
> If uses cacheProfiles in web.config then I need to deploy different
> web.config files from dev
> to production sites.
>
> Thanks


 
Reply With Quote
 
 
 
 
RedHair
Guest
Posts: n/a
 
      11-15-2006
Thanks.
(1) I keep one copy of web.config in VSS, and used it for dev/production and
each
developer's isolated dev environments. Instead, creating a external
reference config
file for each enviornment and doesn't add it to VSS, this will be easier to
manage
and configure all environments.
(2) The cache here means the Page and User Control caching
(3) I'd like have longer caching duration in production but shorter in dev
environment,
because the webform page will read xml file then render html content to
client, if we change
the webform file, there is no problem, but if the designer changes the xml
or xslt files, then
the output won't be changed until the caching is expired.


"kferron" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Well first let me say that in most cases, the web.config in a dev
> environment and a production environment will need to be different.
>
> Second.. what "cache feature" are you speaking of? Theres a number of
> different contexts in which things are being cached, and you as the
> developer have control of.
>
> You may want to look into preprocessor directives if you're talking
> about actually disabling calls to caching specific code that you've
> implemented.
>
> (You should also consider the fact that you would really need to be
> able to build with caching in dev also, in cases where you are dealing
> with and debugging logic related to caching.)
>
>
>
> RedHair wrote:
>> Development: Windows 2003
>> Production :Windows 2003
>> ASP.NET 2.0 + C#
>>
>> I want to disable the cache feature of all pages in dev but enable it in
>> production environments.
>> What's the solution?
>> If uses cacheProfiles in web.config then I need to deploy different
>> web.config files from dev
>> to production sites.
>>
>> Thanks

>



 
Reply With Quote
 
kferron
Guest
Posts: n/a
 
      11-15-2006
Your easiest solution is creating an xml file that acts as a dependency
to the cache. If you just touch the file it will invalidate the cache..
in development you can just make sure your pages are touching the
dependency where appropiate


RedHair wrote:
> Thanks.
> (1) I keep one copy of web.config in VSS, and used it for dev/production and
> each
> developer's isolated dev environments. Instead, creating a external
> reference config
> file for each enviornment and doesn't add it to VSS, this will be easier to
> manage
> and configure all environments.
> (2) The cache here means the Page and User Control caching
> (3) I'd like have longer caching duration in production but shorter in dev
> environment,
> because the webform page will read xml file then render html content to
> client, if we change
> the webform file, there is no problem, but if the designer changes the xml
> or xslt files, then
> the output won't be changed until the caching is expired.
>
>
> "kferron" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
> > Well first let me say that in most cases, the web.config in a dev
> > environment and a production environment will need to be different.
> >
> > Second.. what "cache feature" are you speaking of? Theres a number of
> > different contexts in which things are being cached, and you as the
> > developer have control of.
> >
> > You may want to look into preprocessor directives if you're talking
> > about actually disabling calls to caching specific code that you've
> > implemented.
> >
> > (You should also consider the fact that you would really need to be
> > able to build with caching in dev also, in cases where you are dealing
> > with and debugging logic related to caching.)
> >
> >
> >
> > RedHair wrote:
> >> Development: Windows 2003
> >> Production :Windows 2003
> >> ASP.NET 2.0 + C#
> >>
> >> I want to disable the cache feature of all pages in dev but enable it in
> >> production environments.
> >> What's the solution?
> >> If uses cacheProfiles in web.config then I need to deploy different
> >> web.config files from dev
> >> to production sites.
> >>
> >> Thanks

> >


 
Reply With Quote
 
RedHair
Guest
Posts: n/a
 
      11-15-2006
Thank you!.

You mean that put the xml and xslt as data cache besides the webform
page cache? This will also increase the performance?

I had a performance testing via WAST,if a webform page is already added
the outputCache detective, then no matter the included user control(ascx)
is added the outputCache detective or not. the result is almost same .


"kferron" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Your easiest solution is creating an xml file that acts as a dependency
> to the cache. If you just touch the file it will invalidate the cache..
> in development you can just make sure your pages are touching the
> dependency where appropiate
>
>
> RedHair wrote:
>> Thanks.
>> (1) I keep one copy of web.config in VSS, and used it for dev/production
>> and
>> each
>> developer's isolated dev environments. Instead, creating a external
>> reference config
>> file for each enviornment and doesn't add it to VSS, this will be easier
>> to
>> manage
>> and configure all environments.
>> (2) The cache here means the Page and User Control caching
>> (3) I'd like have longer caching duration in production but shorter in
>> dev
>> environment,
>> because the webform page will read xml file then render html content to
>> client, if we change
>> the webform file, there is no problem, but if the designer changes the
>> xml
>> or xslt files, then
>> the output won't be changed until the caching is expired.
>>
>>
>> "kferron" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) oups.com...
>> > Well first let me say that in most cases, the web.config in a dev
>> > environment and a production environment will need to be different.
>> >
>> > Second.. what "cache feature" are you speaking of? Theres a number of
>> > different contexts in which things are being cached, and you as the
>> > developer have control of.
>> >
>> > You may want to look into preprocessor directives if you're talking
>> > about actually disabling calls to caching specific code that you've
>> > implemented.
>> >
>> > (You should also consider the fact that you would really need to be
>> > able to build with caching in dev also, in cases where you are dealing
>> > with and debugging logic related to caching.)
>> >
>> >
>> >
>> > RedHair wrote:
>> >> Development: Windows 2003
>> >> Production :Windows 2003
>> >> ASP.NET 2.0 + C#
>> >>
>> >> I want to disable the cache feature of all pages in dev but enable it
>> >> in
>> >> production environments.
>> >> What's the solution?
>> >> If uses cacheProfiles in web.config then I need to deploy different
>> >> web.config files from dev
>> >> to production sites.
>> >>
>> >> Thanks
>> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Dev and production web.configs Andrew Morton ASP .Net 1 06-30-2009 02:18 PM
Deploy To Dev and Production Shelves Java 4 07-18-2007 01:38 AM
VS2005 - how to specify location of a text file in dev and production? dgk ASP .Net 5 03-20-2007 06:07 PM
Validators work on dev box but not in production Mark Abbott ASP .Net 2 04-19-2006 04:33 PM



Advertisments