Web caching when retrieving lists of documents

We have a need to leverage client side resources for lists containing tasks.

The client needs to:

  • be notified of updates to the list
  • be able to re-order/filter the list (requesting an update from the server with tasks that the client does not know of/have in cache)

The problem comes on initial load or large list updates (changing from "tasks assigned to me" to "tasks regarding x")

The fastest thing to do is get all the tasks back in a list, instead of individual (10+) requests.

But E-tags will not help when I request an update to a task in the list, as it was not downloaded individually.

Is there some way of getting the browser to cache items in a list against their individual urls?

Or a way of creating a javascript cache that will survive a navigation away?

  • If I navigate away, and go to the task url, will my js objects survive? I suspect no.
  • If I navigate away, then hit back, will my javascript objects survive? I suspect yes.
    • If so, is it possible to have a "task list load" page that will inspect the history and go back to the existing task list? I think no - security.

I'm thinking I'll just have to take the initial loading hits and individually retrieve tasks, so that later requests are fast (and take the load off the server).

--------------Solutions-------------

In HTML5, there is the Window.sessionStorage attribute that is able to store content against a specific session within a tab/window (other windows will have their own storage, even when running against the same session).

There is also localStorage, and database Storage options available in the spec as well.

HTML5 is still a bit far away from being implemented, but you might be able to use Google Gears for your local storage needs.

Also, I've no idea how many simultaneous clients and tasks we're talking about, how big the tasks are and what strain such a request might put on the database, but I'd think you should be able to run smooth without any caching, 10+ requests doesn't seem that much. If traffic is not the bottleneck, I would put caching on the server and keep the client 'dumb'.

Category:javascript Time:2008-11-19 Views:0

Related post

  • Creating a System.Web.Caching.Cache object in a unit test 2008-10-28

    I'm trying to implement a unit test for a function in a project that doesn't have unit tests and this function requires a System.Web.Caching.Cache object as a parameter. I've been trying to create this object by using code such as... System.Web.Cachi

  • Generic wrapper for System.Web.Caching.Cache functions 2010-06-17

    I've created a generic wrapper for using the Cache object: public class Cache<T> where T : class { public Cache Cache {get;set;} public CachedKeys Key {get;set;} public Cache(Cache cache, CachedKeys key){ Cache = cache; Key = key; } public void

  • C#: Caching w/ method attributes VS manually using System.Web.Caching 2010-07-12

    I am calling SSRS web services to retrieve a list of reports and each report's parameters. Since SSRS doesn't have a single web service method to get that data, I need to do it in two steps. 1) Get list of reports. 2) Loop through the list of reports

  • Mocking System.Web.Caching.Cache - Mock or check for null? 2012-04-30

    I'm writing some unit test and am wondering whether it's advantageous to mock the Cache and if so, how? Currently in my tests I'm mocking out the HttpContextBase and wrapping it in a custom HttpContextFactory: var mockedHttpContextBase = new Mock<

  • Retrieving lost email documents saved in individual folders 2014-11-19

    Original title: Retrieving lost email documents saved in individual folders I can't find email documemts prior to 9/2011 which I had saved under individual folders for the past 5 or so years.. Can I retrieve this information? Also I do not like Outlo

  • System.Web.Caching vs. Enterprise Library Caching Block 2008-08-22

    For a .NET component that will be used in both web applications and rich client applications, there seem to be two obvious options for caching: System.Web.Caching or the Ent. Lib. Caching Block. What do you use? Why? System.Web.Caching Is this safe t

  • Problem Using the System.Web.Caching.Cache Class in ASP.NET 2009-02-10

    So I am working on a project which uses ASP.NET. I am trying to call Cache["key"] but the compiler complains about how System.Web.Caching.Cache is "nat valid at this point". If I call Cache obj = new Cache(); the obj is always null. I can access Http

  • Should we not use the System.Web.Caching.Cache class in a WinForms app? 2009-04-27

    I've seen several articles/blog posts that advocate the use of the System.Web.Caching.Cache in applications that are not for the Web, however, the MSDN documentation quite clearly states that The Cache class is not intended for use outside of ASP.NET

  • How can I use System.Web.Caching.Cache in a Console application? 2009-06-24

    Context: .Net 3.5, C# I'd like to have caching mechanism in my Console application. Instead of re-inventing the wheel, I'd like to use System.Web.Caching.Cache (and that's a final decision, I can't use other caching framework, don't ask why). However

  • Difference between System.Web.Cache and HTTPContext.Curent.Cache 2009-09-07

    What is the difference between System.Web.Cache and HTTPContext.Curent.Cache? In which cases both are used? --------------Solutions------------- System.Web.Caching.Cache: this is the implementation of .NET caching. System.Web.HttpContext.Current.Cach

  • Grouping similar objects in web cache (.NET)? 2009-11-03

    I have a bunch of objects all of one class which I want to store in the web cache. There could be a few hundred of these objects. I want objects to have their own individual expiry times, and expire from the cache individually. I want to be able to t

  • System.Web.Caching.Cache.NoSlidingExpiration in asp.net c# 2009-11-30

    Please tell me about System.Web.Caching.Cache.NoSlidingExpiration in ASP.NET. --------------Solutions------------- There's information here from MSDN - NoSlidingExpiration Specifies that an item expires at a set time, regardless of how often it is ac

  • Why System.Web.Cache lost cache once in a while? 2010-01-22

    I've been using System.Web.Cache for a while for testing purpose. It's quite a nice cache store and speed up my webpage quite a lot. But i don't know there are some case, in which i run for a few more more page, and when I turn back to that page few

  • Implement System.Web.Caching.Cache Object in a controller to cache specific query 2010-03-29

    Is it correct to implement my caching object like this in my controller : public class HomeController : BaseController { public static Cache cachingControl = new Cache(); ... And I Use it like this : public ActionResult Home() { IndexViewData view =

  • Passing data from page to page using System.Web.Caching.Cache 2010-04-23

    I'd like to pass data from one asp.net page to another. I've seen that using System.Web.Caching.Cache is a good way to accomplish this. I'm wondering if it's a good way to do it and also is there any cleanup or other things I need to keep in mind whe

  • Does anyone store things in http application cache anymore or system.web.cache only? 2010-06-03

    Does anyone store things in http application cache anymore or system.web.cache only? Or are they the same thing under the covers? --------------Solutions------------- They are the same thing..from the class System.Web.Caching.Cache I do use caching i

  • System.Web.Caching.Cache returning null for a key in the cache 2010-06-21

    I have some code(client side) that is trying to cache responses from a web service. I save the responses in a System.Web.Caching.Cache object gotten from System.Web.HttpRuntime. I make a call once, then i make it again and have a console output sayin

  • Bash : How to read a directory structure and cache it into an xml document 2010-08-18

    I need to read a directory structure from the file system and cache it in an xml document. Can someone suggest me on how to do that using bash ? I only need to cache the directories/subdirectories not files under them . The structure is randomly gene

  • dotnet System.Web.Caching.Cache vs System.Runtime.Caching.MemoryCache 2010-10-07

    I've got a class that needs to store data in a cache. Originally I used it in an asp.net application so I used System.Web.Caching.Cache. Now I need to use it in a Windows Service. Now, as I understand it, I should not use the asp.net cache in a not a

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.666 (s). 13 q(s)