By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,017 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,017 IT Pros & Developers. It's quick & easy.

<%@ OutputCache Duration="30" VaryByParam="none" %>

P: n/a
sorry about the previous post, by mistake not completed.

i have an asp.net page with the line
<%@ OutputCache Duration="30" VaryByParam="none" %>

but when i make requests to the page with different parameters, i get different result,

but i tries to check if i set the VaryByParam to none there should be the same output for different parameters, so why does it not work?

TIA, z.

Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
z.,

When you make requests with different parameters,
you *should* get different data returned.

That's the *purpose* of parameters, to enable dynamic data
to be returned depending on the parameter sent.

If you set VaryByParam to "none", all that means
is that the *caching* won't vary by parameters.

The *data* will, still, vary by parameters.

A VaryByParam of "categoryID" would create separate
*cache entries* for every categoryID in a catalog, for example.

A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
sorry about the previous post, by mistake not completed.

i have an asp.net page with the line
<%@ OutputCache Duration="30" VaryByParam="none" %>

but when i make requests to the page with different parameters, i get
different result,

but i tries to check if i set the VaryByParam to none there should be the
same output for different parameters, so why does it not work?

TIA, z.


Nov 19 '05 #2

P: n/a
i'm trying to understand you

if i have a categoryID parameter for my page.
and i have VaryByParam=none i should get the first cached snapshot of the page what ever parameter is sent after the page being cached.
at least that's what i thought.

so what is happening with this page when it gets 2 different requests, it gives fresh data?

what you mean i your last line (i quote:)
A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters

so VaryByParam of "none" won't cache the page at all and gives fresh data?
another question:

if i put a response.write of the timestamp in my page_load
of a chached page,
shouldn't the value not change between cached requests?
my method should not execute if the output is being cached, so why does it execute?

TIA, z.


"Juan T. Llibre" <no***********@nowhere.com> wrote in message news:OF**************@TK2MSFTNGP09.phx.gbl...
z.,

When you make requests with different parameters,
you *should* get different data returned.

That's the *purpose* of parameters, to enable dynamic data
to be returned depending on the parameter sent.

If you set VaryByParam to "none", all that means
is that the *caching* won't vary by parameters.

The *data* will, still, vary by parameters.

A VaryByParam of "categoryID" would create separate
*cache entries* for every categoryID in a catalog, for example.

A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
sorry about the previous post, by mistake not completed.

i have an asp.net page with the line
<%@ OutputCache Duration="30" VaryByParam="none" %>

but when i make requests to the page with different parameters, i get
different result,

but i tries to check if i set the VaryByParam to none there should be the
same output for different parameters, so why does it not work?

TIA, z.


Nov 19 '05 #3

P: n/a
z,

Could you read these articles,
and then come back with any questions you might still have ?

http://msdn.microsoft.com/library/de...sbestpract.asp

http://msdn.microsoft.com/asp.net/co...sp03282002.asp

From this last article :

VaryByParam: This attribute allows us to control how many cached
versions of the page should be created based on name/value pairs
sent through HTTP POST/GET.

The default value is None.

None implies that only one version of the page is added to the Cache,
and all HTTP GET/POST parameters are simply ignored.

The opposite of the None value is *.

The asterisk implies that all name/value pairs passed in are to be used
to create cached versions of the page.

The granularity can be controlled, however, by naming parameters
(multiple parameter names are separated using semi-colons).

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:uD*************@TK2MSFTNGP09.phx.gbl...
i'm trying to understand you

if i have a categoryID parameter for my page.
and i have VaryByParam=none i should get the first cached snapshot of the
page what ever parameter is sent after the page being cached.
at least that's what i thought.

so what is happening with this page when it gets 2 different requests, it
gives fresh data?

what you mean i your last line (i quote:)
A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters

so VaryByParam of "none" won't cache the page at all and gives fresh data?
another question:

if i put a response.write of the timestamp in my page_load
of a chached page,
shouldn't the value not change between cached requests?
my method should not execute if the output is being cached, so why does it
execute?

TIA, z.


"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
z.,

When you make requests with different parameters,
you *should* get different data returned.

That's the *purpose* of parameters, to enable dynamic data
to be returned depending on the parameter sent.

If you set VaryByParam to "none", all that means
is that the *caching* won't vary by parameters.

The *data* will, still, vary by parameters.

A VaryByParam of "categoryID" would create separate
*cache entries* for every categoryID in a catalog, for example.

A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
sorry about the previous post, by mistake not completed.

i have an asp.net page with the line
<%@ OutputCache Duration="30" VaryByParam="none" %>

but when i make requests to the page with different parameters, i get
different result,

but i tries to check if i set the VaryByParam to none there should be the
same output for different parameters, so why does it not work?

TIA, z.


Nov 19 '05 #4

P: n/a
ok everything is cool, the articles tell what i thought in the first place.
i found my problem

using response.flush inside the code actually cancels the caching.

how should i know about it?

i don't think anywhere this is told.

i had to put and remove all kinds of functions in my code in order to trace this.

is this a must?

who knows......

"Juan T. Llibre" <no***********@nowhere.com> wrote in message news:eA**************@TK2MSFTNGP14.phx.gbl...
z,

Could you read these articles,
and then come back with any questions you might still have ?

http://msdn.microsoft.com/library/de...sbestpract.asp

http://msdn.microsoft.com/asp.net/co...sp03282002.asp

From this last article :

VaryByParam: This attribute allows us to control how many cached
versions of the page should be created based on name/value pairs
sent through HTTP POST/GET.

The default value is None.

None implies that only one version of the page is added to the Cache,
and all HTTP GET/POST parameters are simply ignored.

The opposite of the None value is *.

The asterisk implies that all name/value pairs passed in are to be used
to create cached versions of the page.

The granularity can be controlled, however, by naming parameters
(multiple parameter names are separated using semi-colons).

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:uD*************@TK2MSFTNGP09.phx.gbl...
i'm trying to understand you

if i have a categoryID parameter for my page.
and i have VaryByParam=none i should get the first cached snapshot of the
page what ever parameter is sent after the page being cached.
at least that's what i thought.

so what is happening with this page when it gets 2 different requests, it
gives fresh data?

what you mean i your last line (i quote:)
A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters

so VaryByParam of "none" won't cache the page at all and gives fresh data?
another question:

if i put a response.write of the timestamp in my page_load
of a chached page,
shouldn't the value not change between cached requests?
my method should not execute if the output is being cached, so why does it
execute?

TIA, z.


"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
z.,

When you make requests with different parameters,
you *should* get different data returned.

That's the *purpose* of parameters, to enable dynamic data
to be returned depending on the parameter sent.

If you set VaryByParam to "none", all that means
is that the *caching* won't vary by parameters.

The *data* will, still, vary by parameters.

A VaryByParam of "categoryID" would create separate
*cache entries* for every categoryID in a catalog, for example.

A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
sorry about the previous post, by mistake not completed.

i have an asp.net page with the line
<%@ OutputCache Duration="30" VaryByParam="none" %>

but when i make requests to the page with different parameters, i get
different result,

but i tries to check if i set the VaryByParam to none there should be the
same output for different parameters, so why does it not work?

TIA, z.


Nov 19 '05 #5

P: n/a
Glad to see you worked it out...

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
ok everything is cool, the articles tell what i thought in the first place.
i found my problem

using response.flush inside the code actually cancels the caching.

how should i know about it?

i don't think anywhere this is told.

i had to put and remove all kinds of functions in my code in order to trace
this.

is this a must?

who knows......

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:eA**************@TK2MSFTNGP14.phx.gbl...
z,

Could you read these articles,
and then come back with any questions you might still have ?

http://msdn.microsoft.com/library/de...sbestpract.asp

http://msdn.microsoft.com/asp.net/co...sp03282002.asp

From this last article :

VaryByParam: This attribute allows us to control how many cached
versions of the page should be created based on name/value pairs
sent through HTTP POST/GET.

The default value is None.

None implies that only one version of the page is added to the Cache,
and all HTTP GET/POST parameters are simply ignored.

The opposite of the None value is *.

The asterisk implies that all name/value pairs passed in are to be used
to create cached versions of the page.

The granularity can be controlled, however, by naming parameters
(multiple parameter names are separated using semi-colons).

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:uD*************@TK2MSFTNGP09.phx.gbl...
i'm trying to understand you

if i have a categoryID parameter for my page.
and i have VaryByParam=none i should get the first cached snapshot of the
page what ever parameter is sent after the page being cached.
at least that's what i thought.

so what is happening with this page when it gets 2 different requests, it
gives fresh data?

what you mean i your last line (i quote:)
A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters

so VaryByParam of "none" won't cache the page at all and gives fresh
data?
another question:

if i put a response.write of the timestamp in my page_load
of a chached page,
shouldn't the value not change between cached requests?
my method should not execute if the output is being cached, so why does it
execute?

TIA, z.


"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OF**************@TK2MSFTNGP09.phx.gbl...
z.,

When you make requests with different parameters,
you *should* get different data returned.

That's the *purpose* of parameters, to enable dynamic data
to be returned depending on the parameter sent.

If you set VaryByParam to "none", all that means
is that the *caching* won't vary by parameters.

The *data* will, still, vary by parameters.

A VaryByParam of "categoryID" would create separate
*cache entries* for every categoryID in a catalog, for example.

A VaryByParam of "none", won't *cache* by parameters,
but the *data returned* will, still, vary by parameters.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
sorry about the previous post, by mistake not completed.

i have an asp.net page with the line
<%@ OutputCache Duration="30" VaryByParam="none" %>

but when i make requests to the page with different parameters, i get
different result,

but i tries to check if i set the VaryByParam to none there should be
the
same output for different parameters, so why does it not work?

TIA, z.



Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.