Click here to Skip to main content
15,887,746 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 Title

Cache 

15 Jun 2012 by Rick Bassham
How to use the SqlChangeMonitor with the new MemoryCache class in .NET 4.0.
4 Mar 2019 by marcusts
They got it wrong with IOC containers, but that can be fixed. The post A Smarter DI Container for Xamarin.Forms appeared first on Marcus Technical Services.
30 Jul 2014 by Kumarbs
As per my understand, you are required different session Id's for each operation performed on the authentication. If it so, you can use "GUID" class to generate a random value and store it either in the cookie or session.
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...
21 Jul 2011 by ubaidh sayed
I have a data list control which is placed inside a content place holder. ...
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...
6 Aug 2012 by Member 8714829
I have a class as in the following:public class activityDetail{ public string a { get; set; } public string b { get; set; }}then what I want to do is define a singlton class in my Cache.cs as in the following:public sealed class Cache{private static readonly Cache...
6 Aug 2012 by Sergey Alexandrovich Kryukov
This exception is one of the easiest to nail down and fix. Almost always, it is related to unfinished recursion or mutual recursion:http://en.wikipedia.org/wiki/Recursion[^],http://en.wikipedia.org/wiki/Mutual_recursion[^].Use the debugger, put a breakpoint where the exception is thrown....
7 Aug 2012 by Member 8714829
public activityDetail instanceofActivitydetail { get; set;}and placed the following in the controller (before using the Cache class/property):Cache.CacheInstance.instanceofActivitydetail = new activityDetai();
9 Apr 2021 by Arctype SQL
Explanation of how a query gets execution and understanding the EXPLAIN command
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
13 Aug 2012 by Pavan Navule
Hi,I want to have application level client side caching in asp.netI have the following scenario. And doing the following currently:Works fine in my local machine.A master page and multiple content pages.In master page I have a dropdown to select States in a country.on the...
13 Aug 2012 by Sunil Kumar Pandab
I think website sees "A" selected by default. Because Cache value is shareble to all users. (I am not sure)If you want to store state value from master page with access in every pages and not shareable to all users then you can go for session or cookie.
13 Aug 2012 by pradiprenushe
You are storing cache from code behind which is stored at server side. This is not user specific or instance specific.(As you are storing it in normal way).So you should use session for this thing rather than cache & you dont need to store it in viewstate as already storing it. Main use...
21 Jan 2013 by Md Nazmoon Noor
When it comes to build a high-performance and scalable ASP.Net Web applications Caching is inevitable. It has the ability to store objects whether its data object or pages or controls or even parts of a page. The plan is to keep them in memory while initially requested.
29 Sep 2021 by tugrulGtx
CLOCK caching (LRU approximation) with O(1) cache hit, up to N asynchronous O(1) cache misses
11 Jun 2011 by Omar Al Zabir
An HttpFilter that processes the output generated by dynamic pages and appends the last modified date of static files like js, css in order to make browsers download latest version as soon as files are changed
26 Feb 2013 by Shashwath7
HiI want to know how to avoid creating tmp file of my application,I dont want any tmp files getting stored as it contains a lot of sensitive data what should I do for it
26 Feb 2013 by sjelen
You can use MemoryStream as an in-memory file if you have enough RAM to hold all your data.
26 Feb 2013 by S. M. Ahasan Habib
Please visit the Link
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...
10 Jan 2012 by Naveen Karamchetti
The article attempts to explain when to use the value map caching pattern in BizTalk integrations
16 Apr 2019 by Dan Ionescu (USINESOFT)
LINQ extensions that allow to describe and to safely query cached data
21 Aug 2012 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Hi all,It is a very common practice for the testers while testing any issue to clear cache, temporary files, when any styling changes are updated on the website.And we can't expect the same action from the end users to see the changes.Currently we are facing this issue in our...
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...
21 Aug 2012 by Sandip.Nascar
The best technique is to use versioning to your css and js file.cheers
21 Aug 2012 by Sandip.Nascar
There is a way to do it automatically,In Assembly, set the version number.in code behind, get the assembly version protected string getversion() { return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); }In...
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.
28 Dec 2010 by Nguyễn Minh Phúc
Hi all,I use cache in ASPX but set expire can not excute. Pls look after:I inserted line: In code behide, in page load event: if (Cache["Test"] == null) { Cache["Test"] = 123; ...
28 Dec 2010 by Sandeep Mewara
Have a look at this part: VaryByParam="CID"Any idea what that means? Have a look at the details of Vary-by-param caching here: @ OutputCache[^]Caching Versions of a Page, Based on Parameters[^]You get back the value as 123 as caching is varied by 'CID' querystring value.More...
28 Dec 2010 by thatraja
Sandeep is right, you forgot the thing in the code. You must take a look at this article which is well written.Exploring Caching in ASP.NET[^]
12 Sep 2016 by RAHUL(10217975)
Hi All,I am facing one issue , When I deploy my code changes (Asp.net,c#) in UAT server. Every .aspx file takes the latest version of javascript file and it works correctly but when I deploy my code in production server then .aspx sometimes take cached version of javascript file which cause...
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...
12 Sep 2016 by ZurdoDev
I do not think there is a perfect answer. We have some places where we tack on JavaScript new Date().getTime()to the end or our urls so that IE will think it is a page that has not been viewed before but we still have cache issues. It usually works but not all the time.The best option is...
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?
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
18 Jun 2015 by vksvpp
Hi, How to update cache . My cache object contains 3 fields. Sub,Mark,Result Here Sub is key, I want to update Result using Sub and Mark. (E.g)At first, Sub = Maths, Mark = 40, Result = Fail Now i will update Result as 'Pass'. How...
18 Jun 2015 by ZurdoDev
See the documentation, https://msdn.microsoft.com/en-us/library/system.runtime.caching.memorycache(v=vs.110).aspx[^]
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,
7 Sep 2015 by Sharma Richa
Hi All,I have a menu on containing 5 menus on master page. All Menus contain images. I want these menus to add in cache except one menu that is dynamic(Showing count of messages).For this what i am doing is : 1. Adding the whole menu in an user control and output cache on user...
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...
5 Feb 2014 by pdoxtader
It seems to me that what you really need is a faster way to get the list of files on the file system, rather then keeping 30 files or so in memory.In fact, a better solution given what you've written here is to keep the PATHS of those 30 critical files in memory, or in a log file - and have...
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
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...
5 Sep 2012 by krunal25
Hello everyone,I need some kind of caching mechanism in sql or in asp.net for storing data (records) retrieved from sql stored procedure..Actual scenario :I have one stored procedure in sql which fetches 7 tables and gives the result , the result obtained is too huge i.e. around 5000...
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
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...
5 Sep 2012 by Shriantlandge
You can use SQL paginiation techniq. PLease check below URL :http://shrikantlandge.blogspot.com/2009/05/pagination-with-mssql-server-2005.html[^]
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...
12 Jul 2015 by Sem.Shekhovtsov
Caching the entire asp.net 3.5 web forms page using modules.
29 Sep 2020 by tool__
I'm asking if the files are no longer hosted in their original server do the exists on the Internet Archive? What I have tried: I have tried to cache on the Internet Archive a page with audio files attached, it did not cache the files just the...
29 Sep 2020 by OriginalGriff
No. Only the HTML is cached, it (generally) has no direct access to the data behind that. Think about it: to cache the whole site, it would need direct access to the DB server to cache a snapshot of the whole database which would be a massive...
29 Sep 2020 by tool__
I wonder if the cached page working properly as it was originally. I try to cache a page and be exactly as it was. If you suggest me to try and see, I will, If you have any counsel for me please proceed What I have tried: I'm looking for...
29 Sep 2020 by OriginalGriff
This is just a guess, but ... it sounds like you are trying to use the past state of web site as a backup mechanism for a website, and that really isn't going to work. The wayback machine stores a static copy of the HTML for a site as I...
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.
10 Nov 2018 by MadMyche
Clear the browsers cache as well.
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.
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
24 Sep 2018 by Jeremy Hutchinson
Data driven layout in server-side Blazor
14 Jul 2011 by Member 8015046
HiI have a web service that puts named list of strings on to memory by using Context.Cache. I want to have the choice to save my list of strings if something goes wrong, like if the poster or the reader disconnects some how. So I am wondering if there is a way to put messages from cache and...
18 Jul 2011 by Shameel
I do not understand what you mean by HDD, does it mean storing the strings in a text file in the hard disk? If yes, SQL Server would be a far more superior, efficient and scalable option that using text files. You can write your own custom Cache class that stores its content in an SQL Server...
11 Jul 2012 by Member 8491154
In my project I want to implement this functionality:When a user logs out from the website and then presses the back button he does not navigate to the previous page where he was when he logged out.How do I do this?
11 Jul 2012 by Dylan Morley
Have a read of this article,Web Development - Disabling the back button[^]
11 Jul 2012 by Raje_
Just go this link:-How to disable browser's back button[^]Best of luck.
11 Jul 2012 by Vani Kulkarni
Below article in CP defines the exactly the same functionality which you are looking for:Disabling browser's back functionality on sign out from Asp.Net[^]
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();
12 Jul 2012 by Prasad_Kulkarni
Try this:Just put this javascript on the html section of aspx page above head section function disableBackButton(){window.history.forward();}setTimeout("disableBackButton()", 0);Refer more details: Disable Browser Back Button Using...
12 Jul 2012 by Zubair Alie
Hi,What i think, if you are providing login facility on your web. you must store user's credentials inside session.now on logout trigger, abandon the session [Session.Abandon] and on every page of your site, at onLoad event, you need to check that IF SESSION DOESNOT contain USER'S...
12 Jul 2012 by Member 8491154
The solution is applicable to almost every common broewser used.Add the following script in the "" tag. window.history.forward(); function disableBackButton() { window.history.forward(); } ...
11 Nov 2014 by binit.ku.singh
How to disable page caching in Firefox
13 Jul 2015 by Sem.Shekhovtsov
Setting up Redis server on Windows machine, and accessing it with C# client
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...
20 Aug 2014 by Alexander Gorin
Introduction to txcaching library.
16 Dec 2013 by Rafid K. Al-Humaimidi
Easily support caching in your C# application to improve its performance.
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
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,...
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 ...
14 Jun 2012 by TorstenH.
...I'm not familiar with the memcached - but I see connection problems there.Do you keep the connection to the server or do you make a new connection every time?
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[^]
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 Oct 2022 by Member 14796819
"Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding." in distributed sql server cache My Method to call in controller public async...
2 Jun 2021 by Richard Deeming
Connection Timeout controls how long the code waits to establish the initial connection to SQL. Your error message seems to be a timeout executing a SQL query, which would be controlled by the CommandTimeout on the DbCommand you're executing. ...
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): ...
15 Aug 2013 by Vipul Mehta
Hi,I am using IE8 to access my application. I have implemented below code to make sure my web pages are not...
2 Mar 2021 by tugrulGtx
Accessing VRAM-cached nucleotide sequences in FASTA formatted files (*.fna, *.faa) by index
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.
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[^].
11 Apr 2011 by Wendelius
Here's one possibility: Using Cache in Your WinForms Applications[^].Although the namespace is System.Web.Caching, you can use it other application types also.Of course you can also implement other kind of solutions, based on for example xml-files, data tables etc, but in the end I think...
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...
7 May 2023 by ToughDev
Fix high Windows memory usage caused by large metafile
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...
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[^].
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,...
1 Nov 2011 by Pandya Anil
you can generate URL of any file, if the file is inside your website directory (virtual directory). otherwise not,Example:My project Directory is.D:\ApplicationDir\MyWebiste1.root url is http://mywebsiteserver.com/index.aspx (the index.aspx page is inside MyWebsite1 folder, it means...
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
13 Nov 2018 by Vlad Neculai Vizitiu
Getting closure on Closures
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.