Click here to Skip to main content
15,887,676 members
Everything / Cache

Cache

cache

Great Reads

by Guirec
A pattern for an always available cache using asynchronous refresh.
by AlexCode
Handling different default AJAX caching definitions between browsers.
by Levente Kupás
If you have big reports which run slowly, you may use this T-SQL based engine to speed-up them.
by tugrulGtx
Accessing VRAM-cached nucleotide sequences in FASTA formatted files (*.fna, *.faa) by index

Latest Articles

by ToughDev
Fix high Windows memory usage caused by large metafile
by DiponRoy
How to run FTP, SFTP, SMTP, Cache, LDAP, SSO and other servers in Docker
by tugrulGtx
Direct mapped cache in front, LRU approximation behind, any LLC on back-end.
by tugrulGtx
CLOCK caching (LRU approximation) with O(1) cache hit, up to N asynchronous O(1) cache misses

All Articles

Sort by Updated

Cache 

18 Mar 2014 by _ProgProg_
Hey Guys,I am looking to find the best way to cache the DB Lookup Tables which consists of about 75 table.I want to cache these tables data to use them in my application so i won't open a connection with the DB each time i need them.so Here is what i am doing:1- i have created i...
29 May 2013 by Abhik03
I have developed an web application and am trying to store an object in the cache. But, I'm getting an Error: The type initializer for 'Microsoft.ApplicationServer.Caching.DataCacheFactoryConfiguration' threw an exception.My Code to Add:public static void AddToCache(string cacheName,...
31 Mar 2014 by Abhinav S
There is a term called publisher policy in .Net. This would allow you to allow put a new version of the dll and allow users to use the dll. Msdn link on this topic - http://msdn.microsoft.com/en-us/library/dz32563a(v=vs.110).aspx[^].
4 Feb 2012 by Adnan Masood
How to test and Ensure that AppFabric Service is up and running
1 May 2013 by Advay Pandya
Hello,I am getting caching issue with the browser "Internet Explorer".My web application generates pdf files and I have a results page with links to those PDFs.If I refresh page then it deletes the old file and re-generate the new pdf file.But when I click on the link using...
13 May 2015 by Advay Pandya
The issue is fixed by adding a query string containing time stamp.Like: If my file name is "hello.pdf" then we can pass in the below way mywebsite/hello.pdf?051320151220000 (pdfname?time stamp)by using this way, the browser will think that this is a fresh URL. So it will show the...
1 Sep 2020 by Afzaal Ahmad Zeeshan
Recommendation is to never get your hands dirty for such performance-oriented parts of your application unless you have a solid experience/understanding. Oh, before I start the answer, I should suggest that migrating the code to .NET Framework 4...
21 Jul 2011 by Al Moje
Hi,Your code you'd posted is incomplete. Where did you initialized the value of the following: 1. pageCount 2. PageNo 3. startPage 4. lastPage If I am not mistaken above variable was declared as public right?If I am not mistaken your application has a Master Page.If so,...
25 Jul 2011 by Al Moje
Hi,Try to modified your code as: into then in your click event: UpdatePanel1.Update();or if not work the...
11 Nov 2011 by Alessandro Brito
I’m using Entity Framework 4.1 (Code-First) and SQL2008, and I have one question: Is it possible to include SqlDependency (Sytem.Runtime.Caching) to invalidate the cache when one or more tables are changing with EF 4.1??I’m trying to find any documentation about this, but I just found some...
20 Jun 2012 by Alex Loddengaard
Here's some documentation with a working example. Note that you may not need to worry about authentication depending on your deployment.https://devcenter.heroku.com/articles/memcachier#java[^]
20 Aug 2014 by Alexander Gorin
Introduction to txcaching library.
25 Jul 2011 by AlexCode
Handling different default AJAX caching definitions between browsers.
20 Sep 2013 by alimohammad2011
Greeting for the day !!Dear friends I am stuck on a solution i need to provide to my clients. Describing the requirement in detail so please don't mind the length of this post.I am supposed to develop an offline model for my asp.net (4.5) web application along with SQL server as db on...
1 Aug 2013 by am.net
Hi All,I have the below concerns: What is Client side caching? Is there any other way to store the data at client side other then cookies? Any specific with ASP.ner MVC?I have tried to explore Project Silk : Client Data Management and Caching chapter too but not...
14 Jun 2012 by Anil Kumar 23
Hi,I m tryin to write a simple code in java to connect to memcache server . I using spymemcached 2.8 jar but i m getting server reconnecting error which i m unable to understand.code isclient = new MemcachedClient(new ...
21 Jun 2012 by Anil Kumar 23
Thanks guys, but as it turned out it was a problem of my box[called CPU] , when it ran it on different server it worked like cheese....Thanks a lot again guys...But since we are the topic, the reason behind this non working of memcached service on some system may be due to following...
12 Jan 2019 by AnkushK1
I would not suggest you to go for direct in-memory caching since with growing cache, the performance of application will degrade. However, you can consider using open source tools like Redis that allows you to cache data without causing any performance related issues and better management of...
11 Apr 2011 by apaka
Can anybody give some suggestions ow to implement file based cache in c#. I need to implement asp style cache for my objects but not in memory but in file system because object are large. Thanks in advance.
12 Apr 2011 by apaka
I want to implement my custom cache that inherits from ObjectCache[^].Does anybody know how to do this or has source of MemoryCache because refractor doesn't show nothing. Thanks in advance.
9 Apr 2021 by Arctype SQL
Explanation of how a query gets execution and understanding the EXPLAIN command
23 Aug 2011 by arminamini
Hi every one.I cached my image folder in IIS(http headers).But i have 2 pics in this folder that in any time i should show one of them. and these pics are in a Gridview and i change their visible by Sqldata source.so i want 2 pics in this folder to not cached. so i dont set (Enable...
27 Oct 2014 by ashok_ku_samantray
Query Caching in Django with the help of select_related method
11 Oct 2013 by ASP.NET Community
The Cache and Application objects provide broader scope than the Session object and the data is available to all the classes within the ASP.NET
11 Oct 2013 by ASP.NET Community
ASP.NET 2.0 introduces a new feature called Post-Cache Substitution, which is aimed at optimizing the development experience for this mostly-cached
11 Oct 2013 by ASP.NET Community
In this article I am going to explain how to prevent the browser caching of web pages in asp.net. It is the one of the biggest issues every developer
11 Oct 2013 by ASP.NET Community
 Whenever an attempt is made to access data from the cache, it should be with the assumption that the data might not be there any more. Thus,
11 Oct 2013 by ASP.NET Community
CachingAuthor: Prakash Singh MehraIntroduction: It is a way to store the frequently used data into the server memory which can be retrieved very
2 Oct 2023 by Bhanu Arora 2023
I want to store a high computational parameter to prevent its recomputation. But this parameter needs to be updated frequently to maintain consistency, should I use cache or a database or is there any other better solution for this?? I am using a...
26 Nov 2013 by Binaya Acharya
I am working with winfrom application, for caching i have implemented Enterprise library caching. The definition of cache manager in app.config section is like this
11 Nov 2014 by binit.ku.singh
How to disable page caching in Firefox
25 May 2015 by bugmenotyolohaaha
I've encountered same problem and didn't figure out, that could be related to AppCache. Thanks to this post I've managed to find solution: my app.cachemanifest file contained only "CACHE:" section, so any request to resource that is not listed in that section failed with stupid error message....
23 Nov 2011 by BVKrishna
I wanna access the users' cache information/browsing history so as to change the template fashion accordingly for the appealing effect on my website.Could you please guide me with a programmatic approach, am thinking to deploy crawlers, spiders., being a newbie in programming, i find it hard...
11 Apr 2011 by cechode
public static class FileBasedCahce { static Dictionary _FileMap; const string MAPFILENAME = "FileBasedCahceMAP.dat"; public static string DirectoryLocation = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); static...
4 Jul 2013 by Charlesirwin1810
I have a CSV File(70000 MAX), I have to read it and load it to cache using windows / wcf service and once in a day, on the other hand i have to use the same cache from ASP.Net Application
26 Feb 2012 by Chi Aki
I have a custom RoleProvider and I want to remove the role cache on logout. The roles I have are "Administrator" and "Member", which are working accordingly to authorize every page/action I have in my application but when I try to change the role of the user within the same opened browser it's...
26 Feb 2012 by Chi Aki
Just resolved my problem.. I added Application_OnPostAuthenticateRequest on Global.asax.cs and assigned a new GenericPrincipal to HttpContext.Current.User. :)
5 Sep 2012 by Christian Amado
You will love this feature: SqlCacheDependency.http://msdn.microsoft.com/en-us/library/9dz445ks.aspx[^]Using SqlDependency for data change events[^]Hope it helps
11 Jul 2011 by Christian Graus
One obvious benefit of a DB is that your data is not all in memory, it's on the DB server. One obvious benefit of caching data is that it's in memory already, as opposed to running SQL that needs to do joins and filtering, etc. However, in general, the benefits/costs depend on the nature of...
21 Aug 2012 by Christian Graus
If you really want end users to see the style changes quicker, change the name of the style sheet, so the browser knows it's a new one. Personally, once I release something, I expect that it works fine, and if end users look at the old style for a bit, I don't see a huge issue with...
17 Aug 2021 by Code Fan
If you're caching per user, browser cache is still your best friend. However, server-side cache does one thing browser cache cannot do, that is, shared cache for multiple users. In that case, you can simply use Application instead of Session to...
17 Mar 2013 by Coder93
I want some source for cache replacement policy such as • 1 Pseudo-LRU• 2 Random Replacement• 3 Segmented LRU• 4 Low Inter-reference Recency Set...can anyone help me?
15 Dec 2016 by Codes DeCodes
I am developing a report for my application. The required data for report comes from execution of stored procedure. I will format the records and show in my application. Execution of stored procedure needs about 10 parameters which comes from Dropdown list of Application (which basically means...
9 Nov 2018 by dada2010
Hello everybody i have problems with some code : I try to cache some value from a config file in the global.asax, with a timer. The global goal of the project is to check some data and push messages for all webusers (via SignalR) every 20s. i add dependency on a file, but when updating this...
16 Apr 2019 by Dan Ionescu (USINESOFT)
LINQ extensions that allow to describe and to safely query cached data
14 Aug 2018 by Dave Ceddia
Frameworks like Vue have the notion of “computed properties” – a way to derive some new, possibly complex data based on something passed in. This post covers how to achieve the same result in React.
12 Apr 2011 by Dave Kreskowiak
Reflector worked perfrectly fine for me after opening the System.Runtime.Caching.dll file. MemoryCache disassembles quite nicely.
17 Sep 2019 by Dave Kreskowiak
You want to cache 1,000,000 records on the client-side? One word: Don't. It sounds like you seriously need to re-think your design. The browser should be getting pages of data, only what the browser needs to show. Caching a million records when the client, typically, only needs to see or use a...
1 Sep 2020 by Dave Kreskowiak
Caching really isn't going to help much with that problem. First, loading all the records doesn't scale well, even if you cache the result. You're just transferring more and more data all in one block. The problem you have is that you're...
13 Apr 2021 by Dave Kreskowiak
With such a poor question, the only answer you're going to get is a generic one. Yes. How is dependent on your requirements and existing code, which I seriously doubt you have. This also has nothing to do with SignalR. SignalR just handles...
16 Jan 2015 by dave.chintan
I dont think it is right to cache that much data into cache memory bcoz it will slow down your server.In case of if you have unlimited RAM on your Server then it will be fine for you store this much data in cache
10 Jun 2015 by David A. Gray
When your application initializes, have it open a connection and read the data into a Recordset, then close the connection. If the Recordset is kept in an application global variable (defined in global.asax, it has application lifetime, and is effectively cached.
20 Sep 2017 by ddgjgj
I am very new to caching , so i added this into filter config : public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new OutputCacheAttribute() { Duration = 3600, VaryByParam = "*", Location =...
6 Nov 2012 by Deenuji
How to clear cache memory for login form? i created one login form but whenever i try to login i just click tat username textbox means it shows more than 20 names!!!! how to i clear that??????
18 Jun 2015 by deepankarbhatnagar
HI, please see this link for help, hope this will solve your query. If not then please give your code .A Simple Way to Cache Objects and Collections for Greater Performance and Scalability[^]
30 Jul 2014 by demoninside9
Hi all, There is a requirement for my web form. The application must implement proper session/cookie management on the server side, to ensure strict access control. this would avoid any user in directly copy-pasting of the link to get the unauthorized access into the...
30 Jul 2014 by demoninside9
Hi all, I need to add a new cookie that randomly changes for each login attempt. I need to generate different session id before and after the successful authentication. Also every request after the successful authentication should be associated with an extra session identifier cookie...
12 Aug 2013 by dhage.prashant01
Hi friends,As per my knowledge CacheItemRemoveCallBack is a delegate and provides an indication to the application about the cached item has been removed. I have few question1. when it is fired?2. whats is diff between CacheItemRemoveCallBack and CacheItemUpdateCallback? 3. where is...
27 Nov 2011 by Dinesh K Mandal
17 Jul 2022 by DiponRoy
How to run FTP, SFTP, SMTP, Cache, LDAP, SSO and other servers in Docker
12 Oct 2022 by dominicshaw
Just to expand on Richard's answer - you can put the command timeout in the connection string in the same way that you were putting the connection timeout in, so this is a valid connection string (with the latest EF Core 6 packages): ...
2 Sep 2020 by dsjohn
I have been assigned a “legacy” .Net 3.5 C# “desktop” application. I have limited C#/.Net 3.5 experience. The users of the “desktop” application want the load of a specific Windows form to have better performance. On load, the form reads into a...
11 Jul 2012 by Dylan Morley
Have a read of this article,Web Development - Disabling the back button[^]
5 Sep 2012 by Dylan Morley
What you really want to do is implement a decent paging solution. This will solve both your problems, you won't have slow binding times and you won't use lots of server memory by caching larges amounts of data.Humans can't handle 5000 records at once, it's too much information. Opinions...
2 Oct 2019 by Eduard Silantiev
Deep refactoring and refinement of ASP.NET Core WEB API application code
2 Oct 2019 by Eduard Silantiev
Using various approaches to increase ASP.NET Core WEB API application's productivity
1 Dec 2014 by Er. Dinesh Sharma
Hi Use Binary Serialize to store on local machine with unique key combination and serialize when retrieve.
17 Mar 2013 by Espen Harlinn
As always Google is your friend:Pseudo-LRU[^]Random Replacement[^]Segmented LRU[^]Low Inter-reference Recency Set[^]RegardsEspen Harlinn
14 Jun 2016 by F-ES Sitecore
The server doesn't know when the user clears their cache so you can't react to it. You might have to do something like put a link to a handler on every page, and have it process the "If-Modified-Since" header. If that header is empty then this is the first time the user has requested the url...
12 Sep 2016 by F-ES Sitecore
Assuming SessionID is the asp.net session ID, you are on the right tracks but there is a problem with your implementation. If you update the js file in the middle of someone's session then their id...
2 Sep 2020 by F-ES Sitecore
using System.Data; namespace MyNamespace { public sealed class MyData { private static readonly MyData instance = new MyData(); private DataTable data; public DataTable Data { get ...
1 Nov 2011 by Fabio Di Peri
Hello to all!I need a thing that may seem strange: I need to get the url of some cached files in IE :DI've used a FileSystemWatcher to monitor the cache folder so it fires an event when certain files are created. This way I can have full file path, now I have to get their URLsBasically,...
5 Nov 2011 by Fabio Di Peri
I used wininet.dll to get url of every entry in the cache and then searched for the file I was looking for
20 Jul 2017 by Fiyaz Hasan
This article shows you how to configure the ASP.NET Core 2.0 MVC File action result to write file to response with cache headers.
5 Feb 2014 by frostcox
Hey guys, I'm just wondering if you could help me and possibly give me some suggestions on how to achieve this. Ok, We have a file transfer solution which moves files from A to B and then to C. Files take a long time to transfer from A to B as there is over 300,000 files on the remote server so...
13 Apr 2021 by gacar
I have a SignalR project. Can i use cache some records? And how? What I have tried: I haven't any idea. codeproject alert: Both the question and 'What have you tried' must be between 30 and 50000 characters.
28 May 2014 by GANESHGITE
I am trying to implement Sql Caching in asp.net using Poll base. I refer this link http://www.dotnetfunda.com/articles/show/1382/how-to-implement-sql-caching-in-aspnet-poll-based-sql-cache-dependency In that example they provide operation on one table(ie select query on one table) but I want...
30 Jan 2018 by gbalamurugan
I have new in Redis cache implementation and got in simple example with getstring from Redis Cache. But Same time I didnt get any idea about Set and get list values through Redis. I have Using Provider and Repository. Please help me how to further proceed... What I have tried: public...
29 May 2016 by George Jonsson
Not sure which code block you want to keep, so I used the uncommented code.1. You should always use the using statement, as it will close the connection automatically or use try-catch-finally2. You forgot to assign the CommandText property3. You have an integer type in your parameter...
16 Aug 2018 by Gerry Schmitz
WPF ListBox with Thousands of images (UI responsiveness)[^] How to enable Virtualization for a wpf listview to improve performance?[^]
26 Jul 2010 by Gil Fink
The tip explains how to enable the local cache feature of Velocity (Microsoft Distributed Cache).
10 Nov 2018 by Gozilla99
Hey there, I am using Enlightment Theme for my site. I am regularly having issues with changes not appearing on the site even when flushing server cache etc. Any hints? Anybody using the same theme? Thanks :) What I have tried: - flushing server cache via W3 Total Cache
10 Nov 2018 by Gozilla99
Yes it wasn't appearing on Chrome, FF and IE. It actually is now ... but it took almost two hours. Thanks for your hint though, much appreciated.
11 Jul 2012 by graciax8
you just need to disable caching of the page by adding this code on page load.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);Response.Cache.SetNoStore();
31 Mar 2014 by Grant Weatherston
OK was wondering if someone can offer advice, point me in the right direction:We currently use a DLL file across majority of our sites, we currently operate a development and production versions of each site. We develop code in our DLL and then reference that in the website, and access it...
18 Mar 2013 by greenbox64
Hi,iis 7 has output caching but i wanted to know whether it has something similar to data caching as in asp.net.Let me explain i want to store collection of values on the server. something like Cache[someCollection]The client is simple html pagesthanks
18 Apr 2013 by Guirec
A pattern for an always available cache using asynchronous refresh.
31 Mar 2014 by Guruprasad.K.Basavaraju
Try Response.Redirect("View.aspx", false);I think the response.redirect ends the response. Response.End actually stops the execution of the page wherever it is using a ThreadAbortException. What happens really here is that the session token gets lost in the...
12 Sep 2013 by GUSJIB
i try to use, but i found error Message Box Show "Err.Number = 52"this lineYFCom._VisualM Vism = new YFCom.VisualM();
7 Apr 2013 by H.Brydon
The professor was correct.The short answer to your question is that the code sequence illustrated needs to turn the operations into atomic operations which, amongst other things, will flush the cache and disable/workaround the instruction reordering as described.
10 Mar 2011 by hanbear
Hi there,I just looked for a solution on this question several days but didn't find one, could you please give me any suggestion? Thanks a lot!The background of the question is:We build a file filter driver for windows. When our security app is running, our driver DECRYPT the file data...
9 Aug 2020 by hck007
I am optimizing native version of matrix multiplication and I want to optimize it with OpenMP, SIMD and loop reordering. The following code is my attempt. My question is how I can modify the code so that I can avoid expensive memory write which...
10 Mar 2011 by Henry Minute
This thread[^] has information on reading files without caching. It is in C# but uses the API so would be useable for C++ too.
11 Apr 2011 by Henry Minute
I'm not sure this is a complete solution to your problem since you have not given enough information but have you looked at serialization?csharp-tutorial-serialize-objects-to-a-file[^].There are other serialization strategies in .Net:XML Serialization[^].General overview[^].
12 Apr 2011 by Henry Minute
This[^] blog has an implementation that may help you. It should at least help to show the use of some of the properties/methods.
2 Nov 2015 by Howard Richards
As you're using ASP.NET you probably need to create a button and/or page that will do this, and this will trigger the code on your ASP.NET server to call cache.Remove(key).Assuming clearing the cache is something you don't want normal users to do, the best approach is to put the page/button...
9 Dec 2020 by IAmJoshChang
In this article, we will talk about the top down (memoization) strategy to solve a popular DP problem: Climbing Stairs.
17 Dec 2020 by IAmJoshChang
Today we are going to demonstrate how to use Top Down Dynamic Programming to solve the problem, Coin Change.
24 Sep 2018 by Jeremy Hutchinson
Data driven layout in server-side Blazor