CacheExpirationPolicy="Sliding"

Discussion in 'ASP .Net' started by Marc Vilsmeyer, Jan 14, 2010.

  1. I have defined my ObjectDataSource as:
    <asp:ObjectDataSource ID="ObjDataSourceMultiEditGridView" runat="server"
    EnableCaching="true" CacheDuration="30" CacheExpirationPolicy="Sliding"
    SelectMethod="GetRecordsByAccount" TypeName="GL.BudgetPeriods" >

    My GridView has thousands of records and is using Paging:
    <cc2:MultiEditGridView ID="MultiEditGridView" runat="server" AllowPaging="true" PageSize="12" EnableViewState="false" AllowSorting="False" AutoGenerateColumns="False" CellPadding="0" DataKeyNames="AcctNum" SelectedIndex="0" DataSourceID="ObjDataSourceMultiEditGridView"
    OnRowDataBound="MultiEditGridView_RowDataBound" OnRowUpdated="MultiEditGridView_RowUpdated"
    ForeColor="#333333" Width="97%" OnPageIndexChanging="MultiEditGridView_PageIndexChanging"
    EmptyDataText="Budget Table is Empty" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" >

    I will start selecting page after page every 1 to 2 seconds and after 50 or so seconds it will execute the Select method. Without the EnableCaching="true" the Select Method will be executed every time I selected a different page. I thought that with the caching and the Sliding I got an additional 30 seconds once I selected a different page and the Select method would not be executed.
    What can I do?



    Submitted via EggHeadCafe - Software Developer Portal of Choice
    WeakReferences, Memory Management, Garbage, and More...
    http://www.eggheadcafe.com/tutorial...2b-c93ce562977c/weakreferences-memory-ma.aspx
     
    Marc Vilsmeyer, Jan 14, 2010
    #1
    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. Guadala Harry

    Cache and Sliding Expiration

    Guadala Harry, Nov 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    11,452
    jongalloway
    Nov 4, 2004
  2. Alberto La Pera

    sliding menus

    Alberto La Pera, Dec 8, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    522
    Nick Stansbury
    Dec 8, 2004
  3. Developwebsites

    OT: sliding puzzle code

    Developwebsites, Aug 23, 2003, in forum: Java
    Replies:
    1
    Views:
    584
    Tim Tyler
    Aug 26, 2003
  4. PoetStorm

    sliding menus

    PoetStorm, Jul 28, 2004, in forum: HTML
    Replies:
    13
    Views:
    793
    Nico Schuyt
    Jul 31, 2004
  5. ©®
    Replies:
    0
    Views:
    553
Loading...

Share This Page