Results 1 to 4 of 4

Thread: How to handle the cache and datasets??

Hybrid View

  1. #1
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Re: How to handle the cache and datasets??

    In relation to postbacks, you can use a simple piece of code:

    VB Code:
    1. Sub Page_Load( ... )
    2.     If Not IsPostBack Then
    3.        
    4.     End If
    5. End Sub

    So. Just do the SQL stuff once, store into the cache, and then that's that.


    In relation to storing user preferences, there are lots of ways of doing it. How are users selecting parameters, by tickboxes on forms or textboxes or what?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    Re: How to handle the cache and datasets??

    Yeah I already knew about the postback, thanks I don't think its what I need to solve my performance problem.. I will dig further... Have just spent 2 hours reading through tons of msdn articles on the subject... sessionstate, viewstate, cache tips and tricks


    Anyway, second problem... About remembering viewstate between calls... the first solution that comes into mind is to store the control indexes in the cache along wiht control ID... but is it the best way?? So if it isn't a postback, check the cache for the selectedindexes and textbox texts...

    Or perhaps there is a way to dump the entire viewstate of an object to cache?? not just the properties... Perhaps a performance hit, but the quickest way to do it

    cya
    Henrik

  3. #3
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Re: How to handle the cache and datasets??

    Well, the search criteria could not be that big correct?

    I mean - you have a few true/falses, number ranges perhaps, or a few strings?

    You can save those parameters into viewstate - or if you're worried about context, have you looked into attaching that information in to a cookie?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width