caching

Improve Preloader for img tags present in document

The main goal of this code is to run throw all img tags and load the image to the client cache. During this, I've got and image that will appear by hiding div's above it... Now, This are the answers I'm looking for: Is this really caching the images ? How to simulate the current animation with a less evasive code ? Can this code be r...

C#: Caching w/ method attributes VS manually using System.Web.Caching

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 and for each one, call a web service method to get its parameters. With multiple calls ...

Call an asp.net page (ashx handler) from a different asp.net page

I have a admin page in asp.net that adds data to a database. This database is available as a JSON string to external websites, however, since it's a lot of data, the external websites cache this data locally. I want to be able to ping the external websites to let them know the data has changed so they can referesh their cache. I figure ...

Is 5MB the de facto limit for W3C Web Storage?

I am looking into using browser sessionStorage for a web application, and was trying to find current information on size limitations. It appears most desktop browsers have imposed a 5MB limit. However, I am not finding many recent articles nor information on the mobile browsers. The Disk space of the W3C Web Storage specification says...

Approach to cache large amount of Textual and audio data in Android application

Hi: We are supposed to cache textual and audio data in our application until device is booted or maximum of two days, whichever happens earlier. To get a perspective on data to be cached, note that we are to store about 200 text headers containing around 10 fields, each of length 30 bytes and about 20 sound files each about a minute lon...

Caching a user control and clearing that cache programmatically

Hi, I'm trying to cache user controls and on some pages i want to cache single objects. There are multiple ways of implementing caching, and my head is breaking over it. The way I see the caching options now: You have the PartialCaching option which is set to cache the control for 30 minutes, and after that it clears itself... You hav...

Fast CRC of a Drawing.Bitmap

On application startup I build a cache of icons (24x24 32bbp pre-multiplied argb bitmaps). this cache contains roughly a thousand items. I don't want to store the same image multiple times in this cache, for both memory and performance reasons. I figured the best way would be to create some sort of crc from each bitmap as it goes into th...

Encapsulating an expensive resource without using a Singleton

I am working on updating a legacy application that is absolutely rife with Singleton classes. A perfect example would be the SnmpConnector class: public SnmpConnector { public static IEnumerable<string> HostIpAddresses { ... } private static SnmpConnector instance; public static SnmpConnector Instance { if (instance...

What's the point of cache coherency?

On CPUs like x86, which provide cache coherency, how is this useful from a practical perspective? I understand that the idea is to make memory updates done on one core immediately visible on all other cores. This is a useful property. However, one can't rely too heavily on it if not writing in assembly language, because the compiler c...

Frames + Internet Explorer oddities

I'm running into some very odd beheaviour regarding frames and internet explorer. The situation is like this: I have my web application on www.webapp.com I have a client that wants to have a login box to my www.webapp.com on his website: www.vendor.com The vendor his website is setup by his webdesigner at www.vendor.com. It consists o...

Prevent Safari from Caching Top Sites

I have found what I think to be a big security flaw with Safari's Top Sites image cache. For those who don't know, Safari basically takes a snapshot of every page you visit and this is supposed to be somehow useful to the user. My problem with it is that it even takes snapshots of parts of my site that are password protected. So if someo...

CacheDependancy for multiple Cached items

I would like to have an item in the ASP.NET CacheObject, which if it were changed a number of dependant items would be removed So.. In a request If prompted and it exists in the cache remove the root object, all dependence will be removed too Check for root object in the cache, if it doesn't exist, add it Add other objects to the cach...

How does Smarty work when I define my Cache Function Handler?

I am trying to use my Smarty Cache Handler Function. At the beginning, I use the same example function that is posted in the Smarty manual. function mysql_cache_handler($action, &$smarty_obj, &$cache_content, $tpl_file=null, $cache_id=null, $compile_id=null, $exp_time=null); The problem is that, when I try to do $sma...

JS/CSS caching problem

Hello, To reduce http requests, as well as make the rollout process easier for js/css files, I've setup my php app to do concatenation of js and css files. All included files are sequentially combined into one large file using 2 letter codes for each file (ex. home.js code = "AA"). To generate the names I combine all the codes in the or...

ASP.NET: How to enforce a reload of a web static file

When doing webpages, the client/browser decides if it updates a file like an image or .css or .js or if it takes that from the Cache. In case of .aspx page it is the server who decides. Sure, on IIS level or also using some HttpModule techniques I can change the headers of requests to tell the client if and how long a file should be ...

How can I cache or evalute a modified version of PHP?

I have a modified version of PHP which is compiled to PHP, in PHP. I'm not interested in a discussion about why I shouldn't be doing this; best practice, standards, etc; so please don't. It's not modified in the core, but crudely uses a PHP script to modify each PHP file before being evaluated. Because of the performance hit of modfiyin...

Caching approaches for singular database records.

Consider the following data model: Suppose I have a table called "SuperAwesomeData" where each record maps to an instance of an object called "SuperAwesomeData" which is retrieved by using the primary key for table "SuperAwesomeData". My question is what caching strategy would best work for managing individual records? I need to still...

In Gradle, How do ignore the cache for a local ivy repository?

In my Gradle script (version 0.8), I have a local ivy repository which I use to publish a library, and I can't seem to get Gradle to ignore its cache. I'm accessing the local ivy repo. based on the recommendation in the Gradle manual. Here's there relevant code (with some variables renamed). dependencies{ // [several remote dependen...

Save cache when rotate device.

I have i Gallerywiew Im using lazyload to download images but when i rotate device its reload all images and not use the cache. if i do android:configChanges="keyboardHidden|orientation" the current images are in size of latest orientation. to get the images to show full size i do Display display = ((WindowManager) getSystemService(...

Recommendations for in-memory object cache for .net

I'm wondering what people's experiences are with in-memory cache solutions for .net. We need an (ideally free) out-of-process caching solution that we can share between a number of different web sites (different app pools), and also some console apps that periodically run. We've tried a few solutions so far, both of which are good but ...