I got a MySql database that I do some potentially large queries to. The data I get from the query is stored in a 2D array in PHP which then generates a HTML table for the user to see. Currently I'm trying to implement a way to sort the data in various ways for the user. Of course I could just call the query again and tell it to sort in a...
Hello All,
In one sentence, what i ultimately need to know is how to share objects between mid-tier functions w/ out requiring the application tier to to pass the data model objects.
I'm working on building a mid-tier layer in our current environment for the company I am working for. Currently we are using primarily .NET for programmi...
Hi there
I was wondering if you could help me, Im trying to set an expiration date on the caching of certain files in my website, are there some tips you could give me how to do that? Ive been able to find some things on how to change entire file types, but not SPECIFIC files. Is that possible?
ExpiresActive On # enab...
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 more time, the page query again ( I checked using a profiler ).
Does System.web.cache c...
I'm hosting my WCF application with IIS. To serve some methods I need a reference to helper object which is heavily initialized. A good scenario is to initialise it once and put in a cache, then all requests just use the object from cache. How can I do caching?
The easyiest way is to use static field of mywebmethod. IIS creates several ...
I've been reading recently about cache-oblivious data structures like auxiliary buffer heaps. These data structures work by keeping their most-recently-accessed elements in cache memory so any subsequent access is also quicker.
Most of these data structures are implemented with a low-level language like C/C++. Is it worth it to try to p...
I have a class that contains the following property:
public Dictionary<string, int> CommentCounts {
get {
string cacheKey = "CommentCounts";
HttpContext c = HttpContext.Current;
if (c.Cache[cacheKey] == null) {
c.Cache.Insert(cacheKey, new Dictionary<string, int>(), null, DateTime.UtcNow.AddSecon...
I recently plugged memcaching into my PHP web software. I have a class, Cache, that manages storing things in my memcache pool. In that class, I also maintain an member array--a "threadcache"--that stores up to 100 of the most-used items.
My question is, is threadcaching going to be faster than memcaching? I would think so, coming from ...
I have a situation that I can't seem to find any help on. I looked through many questions on here, but can't seem to find anybody that has asked (or answered) my specific question. Here it is:
Assume I have 2 categories:
Paper (id: 1)
Plastic (id: 2)
The user clicks on Paper, change the name to Plastic, and click 'Submit'.
Inside m...
It's easy to decide which information to cache in memory in a node-like web-site, where you have few nodes, most popular pages, you can keep in memory. But what about sites where the whole mass of pages has same chances to be required?
For example - Wiki-sites or social nets?
added
Something's wrong with "add comment" button...
Well,...
I have a List of objects in an asp.net page. when the page loads in the browser for the first time, I fetch data from the database, create objects with those data and populate the list. All these are done inside the page load event handler. Now when the page is posted back to the page, the previous list is gone, since the variables were...
We are moving our legacy implementation to Spring IBatis model. I am kind of stuck in modeling these objects in cleaner way using Spring model
Lets say I have two classes [ Both of them are singleton ]
DAOImpl implements DAOInterface
CacheDAOImpl implements DAOInterface
Code snippet showing object initialization in CacheDAOImpl
....
In some requests, external data has to be fetched from Soap service. Obviously I don't want to get that data at each call for the same user.
What is the best practice to store temporary data from one request to the other? The data could take up to 10 meg.
...
Is it possible to configure lighttpd so that a request for a file succeeds if the file exists, but is handled and redirected, for example to a cgi script, if the file does not exist?
What I'm trying to achieve is having a set of image files on disk which are generated by a script and served directly. On a request, if the file does not e...
I have an application in asp.net mvc (C#), in which each user have different products sharing a common table separated by user id.
I need to implement SqlCacheDependency for each user's products.
The Scenario is: say there are two users (user1 and user2) and products assigned for them based on the user id.
I need to cache the product...
I'm trying to design a simple cache that follows the following rules:
Entries have a unique key
When the number of entries in the cache exceeds a certain limit, the older items are evicted (to keep the cache from getting too large).
Each entry's data is immutable until the entry is removed from the cache.
A 'reader' can access an entry...
Is there a Windows equivalent to Linux's readahead syscall?
EDIT:
I would like a full function signature if possible, showing the equivalent offset/count parameters (or lower/upper).
Eg:
The Linux function signature is:
ssize_t readahead(int fd, off64_t *offset, size_t count);
and an example of it's use is
readahead(file, 100, 500...
I end up with a lot of code like this:
List<string> dates = someMethodCall();
foreach (string dateStr in dates) { }
I usually declare the object over which I'm iterating and then use it in the foreach condition out of worry that someMethodCall() would happen for each iteration of the loop. Is this the case? I would prefer to do this...
I have a MasterPage that has ViewData passed to it. I would really like to cache only the MasterPage for performance reasons. But I do not want to cache the actual page that is loading with the MasterPage.
I believe this can be done in web forms by adding code in to the Page_Load event. Does anyone know of a similar technique using ASP....
I've seen there is a plenty of them. NCache, Velocity and so forth but I haven't found a table comparing them.
What's the best considering the following criterias:
Easy to understand.
Is being maintained lately.
Is free or has a good enough free version.
Works.
...