Enhancing ASP.NET Framework

Discussion in 'ASP .Net' started by Dmitriy Zakharov, Sep 3, 2004.

  1. Hi Everyone,

    You know how we have cache objects at different levels in ASP.NET.

    For example, there is one at application level (Cache) and one at user level
    (Session).

    How about having one at page level ? I understand it can be done manually,
    but why not embed it into the Framework ?

    Any ideas ?

    Dmitriy.
    Dmitriy Zakharov, Sep 3, 2004
    #1
    1. Advertising

  2. Dmitriy Zakharov

    Patrice Guest

    You could use System.Web.HttpContext.Current.Items that is kept for the HTTP
    request lifetime...

    Patrice

    --

    "Dmitriy Zakharov" <> a écrit dans le message de
    news:...
    > Hi Everyone,
    >
    > You know how we have cache objects at different levels in ASP.NET.
    >
    > For example, there is one at application level (Cache) and one at user

    level
    > (Session).
    >
    > How about having one at page level ? I understand it can be done manually,
    > but why not embed it into the Framework ?
    >
    > Any ideas ?
    >
    > Dmitriy.
    >
    >
    Patrice, Sep 3, 2004
    #2
    1. Advertising

  3. Dmitriy Zakharov

    Patrice Guest

    You may still want to explain your exact need. I don't really see what you
    meant by "caching" at the page level.

    IMO :
    1 - for the request, you have items as previously posted
    2 - for the page you can also cache the page content or fragments. Is this
    what you meant ?
    3 - caching objects themselves at the page level ? I don't really see what
    you mean. You could use the Cache anyway using the page path.

    I believe you are rather looking for 2 ?

    Patrice

    --

    "Patrice" <> a écrit dans le message de
    news:%...
    > You could use System.Web.HttpContext.Current.Items that is kept for the

    HTTP
    > request lifetime...
    >
    > Patrice
    >
    > --
    >
    > "Dmitriy Zakharov" <> a écrit dans le message de
    > news:...
    > > Hi Everyone,
    > >
    > > You know how we have cache objects at different levels in ASP.NET.
    > >
    > > For example, there is one at application level (Cache) and one at user

    > level
    > > (Session).
    > >
    > > How about having one at page level ? I understand it can be done

    manually,
    > > but why not embed it into the Framework ?
    > >
    > > Any ideas ?
    > >
    > > Dmitriy.
    > >
    > >

    >
    >
    Patrice, Sep 3, 2004
    #3
  4. Yeah, maybe they could put in some hidden form field where you could cache
    data in the page. They could call it ViewState.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Dmitriy Zakharov" <> wrote in message
    news:...
    > Hi Everyone,
    >
    > You know how we have cache objects at different levels in ASP.NET.
    >
    > For example, there is one at application level (Cache) and one at user

    level
    > (Session).
    >
    > How about having one at page level ? I understand it can be done manually,
    > but why not embed it into the Framework ?
    >
    > Any ideas ?
    >
    > Dmitriy.
    >
    >
    Kevin Spencer, Sep 3, 2004
    #4
  5. Dmitriy Zakharov

    Mark Rae Guest

    "Kevin Spencer" <> wrote in message
    news:...

    > Yeah, maybe they could put in some hidden form field where you could cache
    > data in the page. They could call it ViewState.


    LOL!
    Mark Rae, Sep 3, 2004
    #5
  6. Would really be cool isn't it? :)

    "Kevin Spencer" wrote:

    > Yeah, maybe they could put in some hidden form field where you could cache
    > data in the page. They could call it ViewState.
    >
    > --
    > HTH,
    > Kevin Spencer
    > ..Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Dmitriy Zakharov" <> wrote in message
    > news:...
    > > Hi Everyone,
    > >
    > > You know how we have cache objects at different levels in ASP.NET.
    > >
    > > For example, there is one at application level (Cache) and one at user

    > level
    > > (Session).
    > >
    > > How about having one at page level ? I understand it can be done manually,
    > > but why not embed it into the Framework ?
    > >
    > > Any ideas ?
    > >
    > > Dmitriy.
    > >
    > >

    >
    >
    >
    =?Utf-8?B?RXRoZW0gQXp1bg==?=, Sep 3, 2004
    #6
  7. I'm not looking for output caching. I'm looking to persist some page-level
    state on the server.

    I have a page, which is an editor for a large dataset. I prefer to keep this
    dataset in server's memory.

    Any suggestions, except Cache and Session objects ?


    "Patrice" <> wrote in message
    news:...
    > You may still want to explain your exact need. I don't really see what you
    > meant by "caching" at the page level.
    >
    > IMO :
    > 1 - for the request, you have items as previously posted
    > 2 - for the page you can also cache the page content or fragments. Is this
    > what you meant ?
    > 3 - caching objects themselves at the page level ? I don't really see what
    > you mean. You could use the Cache anyway using the page path.
    >
    > I believe you are rather looking for 2 ?
    >
    > Patrice
    >
    > --
    >
    > "Patrice" <> a écrit dans le message de
    > news:%...
    > > You could use System.Web.HttpContext.Current.Items that is kept for the

    > HTTP
    > > request lifetime...
    > >
    > > Patrice
    > >
    > > --
    > >
    > > "Dmitriy Zakharov" <> a écrit dans le message de
    > > news:...
    > > > Hi Everyone,
    > > >
    > > > You know how we have cache objects at different levels in ASP.NET.
    > > >
    > > > For example, there is one at application level (Cache) and one at user

    > > level
    > > > (Session).
    > > >
    > > > How about having one at page level ? I understand it can be done

    > manually,
    > > > but why not embed it into the Framework ?
    > > >
    > > > Any ideas ?
    > > >
    > > > Dmitriy.
    > > >
    > > >

    > >
    > >

    >
    >
    Dmitriy Zakharov, Sep 3, 2004
    #7
  8. ViewState is a hidden field on a form that stores anything as BASE64
    encoded. The state information is bounced between client and server.

    Its a good idea to store small non-critical objects in a ViewState.

    Any ideas on bigger objects or sensitive information ?

    Will you store temporary balance of someone's bank account in a client-side
    ViewState ?


    "Kevin Spencer" <> wrote in message
    news:...
    > Yeah, maybe they could put in some hidden form field where you could cache
    > data in the page. They could call it ViewState.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Dmitriy Zakharov" <> wrote in message
    > news:...
    > > Hi Everyone,
    > >
    > > You know how we have cache objects at different levels in ASP.NET.
    > >
    > > For example, there is one at application level (Cache) and one at user

    > level
    > > (Session).
    > >
    > > How about having one at page level ? I understand it can be done

    manually,
    > > but why not embed it into the Framework ?
    > >
    > > Any ideas ?
    > >
    > > Dmitriy.
    > >
    > >

    >
    >
    Dmitriy Zakharov, Sep 3, 2004
    #8
  9. Dmitriy Zakharov

    Scott Allen Guest

    Hi Dmitriy:

    I think the chosen terminology caused some confusion. When you asked
    for a technique to "cache page-level state", we assumed you meant
    information that only needed to be around for the duration of the page
    request. On the server side, the logical container for this would be
    the HttpContext Item collection.

    What I think you are looking for is really session state caching,
    because it sounds like you need the information to outlive the
    lifetime of a single page request and be available the next time the
    client hits a page to get the editable DataSet object. In this case,
    Session and Cache are the two built in mechanisms to keep state on the
    server. The difference being that with cache, you'd have to scope the
    entry to a specific user by keeping a user identifier in the cache
    key.

    HTH,

    --
    Scott
    http://www.OdeToCode.com

    On Fri, 3 Sep 2004 16:59:42 -0400, "Dmitriy Zakharov"
    <> wrote:

    >ViewState is a hidden field on a form that stores anything as BASE64
    >encoded. The state information is bounced between client and server.
    >
    >Its a good idea to store small non-critical objects in a ViewState.
    >
    >Any ideas on bigger objects or sensitive information ?
    >
    >Will you store temporary balance of someone's bank account in a client-side
    >ViewState ?
    >
    >
    Scott Allen, Sep 4, 2004
    #9
  10. Dmitriy Zakharov

    Patrice Guest

    You could also persists this to a file. Do you need such a large dataset for
    edition or could the user select a smaller chunk before editing ?

    What is the thing you don't like with Session or Cache ? Also the UI could
    provide a point (such as "Save changes" button) at which changes are
    committed in the DB allowing also to clear cached data (or to delete the
    file used for caching).

    IMO it would be quite hard to have this handled for you as - unlike caching
    page content - the various steps will have each their own action to be
    performed (loading from the database, editing while not done, deleting and
    updating data once completed etc...)

    Patrice

    --

    "Dmitriy Zakharov" <> a écrit dans le message de
    news:uZv%...
    > I'm not looking for output caching. I'm looking to persist some page-level
    > state on the server.
    >
    > I have a page, which is an editor for a large dataset. I prefer to keep

    this
    > dataset in server's memory.
    >
    > Any suggestions, except Cache and Session objects ?
    >
    >
    > "Patrice" <> wrote in message
    > news:...
    > > You may still want to explain your exact need. I don't really see what

    you
    > > meant by "caching" at the page level.
    > >
    > > IMO :
    > > 1 - for the request, you have items as previously posted
    > > 2 - for the page you can also cache the page content or fragments. Is

    this
    > > what you meant ?
    > > 3 - caching objects themselves at the page level ? I don't really see

    what
    > > you mean. You could use the Cache anyway using the page path.
    > >
    > > I believe you are rather looking for 2 ?
    > >
    > > Patrice
    > >
    > > --
    > >
    > > "Patrice" <> a écrit dans le message de
    > > news:%...
    > > > You could use System.Web.HttpContext.Current.Items that is kept for

    the
    > > HTTP
    > > > request lifetime...
    > > >
    > > > Patrice
    > > >
    > > > --
    > > >
    > > > "Dmitriy Zakharov" <> a écrit dans le message de
    > > > news:...
    > > > > Hi Everyone,
    > > > >
    > > > > You know how we have cache objects at different levels in ASP.NET.
    > > > >
    > > > > For example, there is one at application level (Cache) and one at

    user
    > > > level
    > > > > (Session).
    > > > >
    > > > > How about having one at page level ? I understand it can be done

    > > manually,
    > > > > but why not embed it into the Framework ?
    > > > >
    > > > > Any ideas ?
    > > > >
    > > > > Dmitriy.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Patrice, Sep 6, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-1?Q?Christian_Brechb=FChler?=

    Enhancing valarray with "normal" arithmetic operators

    =?ISO-8859-1?Q?Christian_Brechb=FChler?=, Sep 12, 2003, in forum: C++
    Replies:
    6
    Views:
    956
    =?ISO-8859-1?Q?Christian_Brechb=FChler?=
    Sep 14, 2003
  2. Replies:
    0
    Views:
    319
  3. Benjamin Scott
    Replies:
    0
    Views:
    264
    Benjamin Scott
    Sep 28, 2004
  4. Jim Lewis
    Replies:
    6
    Views:
    520
    Torsten Landschoff
    Apr 3, 2007
  5. Ryan
    Replies:
    2
    Views:
    323
Loading...

Share This Page