I have written an HttpModule that accepts the request, processes it (via a database lookup), and outputs results (html) back to the response. (Note that the HttpModule actually ends the request after it is done, so there is no normal ASP.NET processing of the request.)
As the database lookup can be expensive/time-consuming, I would like...
On a few occasions now when I've moved from development to staging, I've been bitten by how JavaScript and stylesheets change their behaviour when rolled up into a single file.
For example, I'm trying to keep the series of stylesheets modular and small for maintainability, like so:
<%= stylesheet_link_tag "reset-fonts-grid.css", "typ...
Hi,
I want to permanently add an item to the cache. I am using the following syntax:
HttpContext.Current.Cache.Insert(cacheName, c, null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration);
I have found out, that ASP.NET still sometimes removes items from the cache.
Any ideas on how to prevent this (in addition to dropping the c...
My site loads images based on names that are created for them. It loads images assuming that they're there when sometimes they're not. Every time it loads an image like this:
<img src="/myimages/my-image.jpg" alt=""/>
if it's not there on the server, it seems to cache that there wasn't an image there, so next time I load up the same i...
I am creating a webpage and whenever I refresh or move from page to page, it keeps on just reloading the cache values. But I don't want it to do that because I am working with dynamic data (from the database) so I want it to reload values from the database each time it refreshes, or whenever any page processing is done.
And I don't mean ...
I have an interesting delimma. I have a very expensive query that involves doing several full table scans and expensive joins, as well as calling out to a scalar UDF that calculates some geospatial data.
The end result is a resultset that contains data that is presented to the user. However, I can't return everything I want to show the ...
The image below was scanned (poorly) from Computer Systems: A Programmer's Perspective. (I apologize to the publisher). This appears on page 489.
I'm having a terribly difficult time understanding some of these calculations. At the current moment, what is troubling me is the calculation for M, which is supposed to be the number of uni...
I am having trouble using the output cache param in an aspnet 2.0 page directive. I am using a session variable to hold the value of the selected image. It seems that the dynamic control in a datalist, is not working when the output cache is set to true in the page directive. Is there a way to cache the images seperately to avoid using a...
I am looking for a good explanation of why one would use sliding expiration when caching data in a Web application. It seems as if you would always want to cache content using absolute expiration so the data is forced to be refreshed. With sliding expiration you risk having your data be cached indefinitely. Is it only useful for cachi...
I was hoping somebody somewhere has compiled a human readable list of L1 cache size / line size for recent processors.
...
Suppose we got a code like this:
IEnumerable<Foo> A = meh();
IEnumerable<Foo> B = meh();
var x =
from a in A
from b in B
select new {a, b};
Let's also assume that meh returns an IEnumerable which performs a lot of expensive calculations when iterated over. Of course, we can simply cache the calculated results manually by ...
Hello Community,
I have the following problem, I have a flex application that works as a frontend in a client-server-application. In my application I have two sliders and a chart that moves when I drag the sliders, now when I have the following positions
slider 1: 10
slider 2: 20
a request is sent to the server and the response back ...
hi ,
i'm using Smarty with my php code and i like to cache some of website pages so i used the following code :
// TOP of script
ob_start(); // start the output buffer
$cachefile ="cache/cachefile.html";
// normal PHP script
$smarty->display('somefile.tpl.html') ;
$fp = fopen($cachefile, 'w'); // open the cache file for writing
fwri...
Using Django's cache with locmem (with simple Python classes as values stored in lists/tuples/maps) works perfectly but does not work with memcached.
Only a fraction of the keys (despite ample memory allocated and large timeouts) make their way into memcached, and none of them appear to have any associated value.
When they are retrieve...
I'm coming largely from a c++ background, but I think this question applies to threading in any language. Here's the scenario:
We have two threads (ThreadA and ThreadB), and a value x in shared memory
Assume that access to x is appropriately controlled by a mutex (or other suitable synchronization control)
If the threads happen to run ...
I am trying to learn a bit of Ruby. I've installed Ruby on my Ubuntu machine and I am using apache. Everything works fine except to refresh a view I have to restart apache in the console and then hit ctrl-r, just pressing ctrl-r won't refresh the browser.
Apparently there's some caching going on, but does it have to be that way i.e. is ...
Hello. I have a search functionality on my site that is accessible from every page. Typical top of the masterpage textbox and button deal. I'm looking for a better way to accomplish my caching of the most common search strings and their result using System.Web.Caching.Cache.
I was thinking of concatenating the search string with so...
I know there is a very similar question here but I was hoping to get a better explination. Why would I ever use HttpContext.Cache instead of HttpRuntime.Cache if the HttpContext really uses the HttpRuntime.Cache behind the scenes?
In the article Simulate a Windows Service using ASP.NET to run scheduled jobs Omar uses the HttpContext to ...
How can I use output caching with a .ashx handler? In this case I'm doing some heavy image processing and would like the handler to be cached for a minute or so.
Also, does anyone have any recommendations on how to prevent dogpiling?
...
I am using jquery to append or remove a <ListItem> (rendered as <option>) from the <ListBox> (rendered as <select multiple="multiple">).
The problem arises when I try to save on PostBack. The correct information is saved to the database. However, when the page is loaded on PostBack instead of the new data from the database being loaded...