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

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...
29 Sep 2023 by OriginalGriff
All a Cache is is memory that is "closer to the processor" - often part of the same chip, and which is faster for the processor to access that having to go outside the CPU to main memory top get the value. And all frequent updates will do is...
7 May 2023 by ToughDev
Fix high Windows memory usage caused by large metafile
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...
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): ...
17 Jul 2022 by DiponRoy
How to run FTP, SFTP, SMTP, Cache, LDAP, SSO and other servers in Docker
14 Nov 2021 by Member 15421351
I want to set Cache implementation properly in asp.net with c#. I tried setting the same in both web.config and in Global.asax. Cache value coming as Private and Expires attribute value is not coming as -1. What I have tried: In web.config ...
29 Oct 2021 by tugrulGtx
Direct mapped cache in front, LRU approximation behind, any LLC on back-end.
20 Oct 2021 by Member 15401444
I want to create a cache which evicts entries based on whether the cache size was hit or the TTL for the entry was hit. I couldn't find any code for a similar cache online using c++. Has anyone found any documentation for this? What I have...
20 Oct 2021 by Rick York
This might provide a good place to start : Multi Level Cache that Does Up To A Billion Lookups Per Second in C++[^].
29 Sep 2021 by tugrulGtx
CLOCK caching (LRU approximation) with O(1) cache hit, up to N asynchronous O(1) cache misses
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 Aug 2021 by Mr_cool
I want to achieve the functionality of caching all static resources and deliver as html pages. I'm using asp.net 4.5 with SQL Server What I have tried: Package that speeds up loading of JavaScript, CSS and image files[^] but this looks old. ...
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. ...
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.
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...
9 Apr 2021 by Arctype SQL
Explanation of how a query gets execution and understanding the EXPLAIN command
2 Mar 2021 by tugrulGtx
Accessing VRAM-cached nucleotide sequences in FASTA formatted files (*.fna, *.faa) by index
19 Dec 2020 by Nikhil Sreenivasan
I'm working on an online courses website where the user's will register and subscribe to different courses for a period of 1 month? I want to implement a functionality wherein the users can download the videos to their account and later on watch...
19 Dec 2020 by Richard MacCutchan
I assume this is a continuation of https://www.codeproject.com/Questions/5289939/How-to-implement-an-online-storage-for-a-website[^]. There are plenty of examples of how to provide downloads from your website that Google will find for you. And...
17 Dec 2020 by IAmJoshChang
Today we are going to demonstrate how to use Top Down Dynamic Programming to solve the problem, Coin Change.
15 Dec 2020 by Richard MacCutchan
You already posted this question at https://www.codeproject.com/Questions/5289728/How-to-precache-the-first-100KB-of-next-videos-fro?cmt=1063725#cmt1063725[^]. Why have you created a second account just to repost this?
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.
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...
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 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...
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...
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 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...
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...
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...
9 Aug 2020 by KarstenK
check that you only calculate what you need and extract ANY constant value out of the loops and use const where possible. Like in for(int x = J / 4 * 4; x data[i * J + x] += mat1 -> data[i * K + k] * mat2 -> data[k * J + x];...
1 Jun 2020 by Mohammad Nasirifar
Ways to overcome simple annoying problems that arise while writing code by writing tests
5 Nov 2019 by Kevin Mack
Hello all, It’s been a while since I did a blog post outside of the weekly updates. But I wanted to do one in terms of conversations that I’ve been having a lot lately and seems to be largely universal. High Availability.
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
17 Sep 2019 by Patrice T
Quote: What is the best method to browser cache 10 lac records from SQL database in ASP.NET? The best method is to not do it. Loading the phone directory of your country in a droplist is a bad idea. Even a rate of 1000 records per second makes it 20 minutes to load. Advice: look at web sites on...
17 Sep 2019 by Pranay Bhatia
Have done caching on the app server but want to cache data even on the browser level. Any suggestions would help. What I have tried: Have done caching on the app server but want to cache data even on the browser level.
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...
16 Apr 2019 by Dan Ionescu (USINESOFT)
LINQ extensions that allow to describe and to safely query cached data
29 Mar 2019 by setevoy4
In this post – some quick overview, a brief explanation about differences in Redis data storage, topology examples. In short terms but with links to detailed documentation and other useful posts on other resources.
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.
12 Jan 2019 by Navneet Kumar
Currently using Web API to access exchange data and there is an increase of 5000 records every month. Total size as of now is 8 MB. Someone suggested me to use data caching for this data. Please help me to identify, when to use data caching based on below parameters. Data Volume Monthly new...
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...
13 Nov 2018 by Vlad Neculai Vizitiu
Getting closure on Closures
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 MadMyche
Clear the browsers cache as well.
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.
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...
29 Oct 2018 by V5709
I have used caching in application which is related to name space System.Runtime.Caching. I have two classes Customer and Sale. Object of Customer class is referenced in parent class ie. Sale. collection of both entities added in cached collection differently. Suppose I have updated Customer A...
24 Sep 2018 by Jeremy Hutchinson
Data driven layout in server-side Blazor
16 Aug 2018 by pravinchopade
Hi, I have a listview with Image control, bound with Uri value (image path on disk). I want to convert only those Uri in "Field of view" and dispose (or convert back to Uri) which goes out of "Field of View". Thanks in advance. What I have tried: I have used IValueConverter to convert Uri to...
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?[^]
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.
7 Aug 2018 by Proneetkumar Pradeep Ray
Boost/Optimize your Jquery DataTable and perform Server side pagination, Global Search, Column wise Search) using Server Side Caching
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...
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 =...
31 Jul 2017 by Sharp Ninja
Caching doesn't have to be complicated.
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.
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...
27 Nov 2016 by sunil kumar meena
I've winform application where I exposed a WCF service and it is hosted on IIS on the server, and there are around 10 methods in it.There is some common data that I need in computation of all 10 methods. What I want is to get this common data only once when service start and put it in cache...
27 Nov 2016 by sunil kumar meena
I found the simple solution of my this problem. In Cache class I've add a static constructor and there I wrote the code of fetching cache data. As we all know static constructor can be called only once and it can't be called explicitly. So as soon as we try to read any variable of Cache class...
26 Sep 2016 by Member 11026826
I want to cache a UrlRecord list which store the Slugs. Can someone give me any suggest?Thank you.What I have tried:At first time, i am cache in a custom middleware class, but it called for every httpRequest.
26 Sep 2016 by Vincent Maverick Durano
There's an official docs regarding caching for ASP.NET Core apps here: In Memory Caching — ASP.NET documentation[^]
25 Sep 2016 by TheCodeKing
SaintModeCache is a thread safe in-memory cache wrapper for performance optimisation. It's able to continue serving stale content after expiry, whilst it repopulates the cache with a non-blocking single thread.
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 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...
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...
14 Jun 2016 by Member 11990968
I have stored a value in a key and cached it(using HttpRunTime.Cache.Insert) for a specific period of time(say 20 mins). Now I want to clear the cache whenever the cache is cleared from the browser the user. How do I do it(what code do I need to write on the server side for that)?What I have...
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...
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...
24 Apr 2016 by Member 1097736
I read through many blog posts and documentation . But am unable to proceed further with redis implementation.What I have tried:I have installed redis locally .Inserted data and retrieved data using web api in c# code with help of servicestack drivers.I want to configure the redis...
24 Apr 2016 by Member 1097736
To manage cached data we must specify configuration parameter and its values.An example of redis.conf file is available in redislinkWhen redis is used as a cache server, it uses an approximated LRU(Least Recently Used)technique to evict cached data.Data can be evicted by using any 7 of...
19 Apr 2016 by Marla Sukesh
In this article we will talk about Server Sent Events in detail.
19 Apr 2016 by Marla Sukesh
Welcome to day 1 of Learn HTML 5 in 3 days article series
3 Mar 2016 by Member 12357126
" media="screen" />Keeps returning style.css.How do I make it return style.min.css? Reminder: I want to be able to do this within the...
3 Mar 2016 by zapbuild
Hi, bloginfo('stylesheet_url') will return theme's stylesheet path of style.css file not style.min.css file, if you want to use the style.min.css file then you can use the following code:
29 Feb 2016 by zapbuild
Hi,bloginfo('stylesheet_ur...
4 Feb 2016 by Nime Cloud
It seems I'm banned from codeproject.cachefly.net, I cannot ping from my home. Many resources cannot open so browser renders pages incorrectly.My IP is dynamic.http://codeproject.cachefly.net/Images/t.gif Failed to load resource: the server responded with a status of 504 (Gateway...
3 Jan 2016 by Velkumar Kannan
Hi,I have a ASP.Net MVC appication, from one controller action I am calling another method, which is in another class, From that method I am calling another WebAPI action.I have applied caching in the controller action using OutputCache attribute.But the caching is not working when...
11 Dec 2015 by Oliver Bleckmann
take a look at some sources e.g. https://github.com/gingi/web-cache[^]
26 Nov 2015 by sanjay243657
Hi, Please check below link,http://www.c-sharpcorner.com/UploadFile/2072a9/caching-in-Asp-Net/[^]http://www.tutorialspoint.com/asp.net/asp.net_data_caching.htm[^]Caching in ASP.NET[^]
26 Nov 2015 by NewWebDesigner
i search a lot but cannot find complete answer or paper about caching.i use asp.net 4.5 and work with 3 layers to create website.i want to know about cach,types and fault,advantage.when i cach a usercontrol in asp.net what save in cach and other things.i know primary about it but i...
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...
2 Nov 2015 by Member 11138484
Scenario : I have an object (result set from DB) stored in memory cache (cache.Add(key, object)). This cache is having absolute expiration as cache policy. Some times I need to clear the object in cache (cache.Remove(key)) before the expiration. My application is running on IIS which should...
24 Sep 2015 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
I would suggest to have a UserPreference table in database with UserId as unique column. and have a button on page "Save Preferences".Then on click of that, just do an Ajax call and update the table for that User.
24 Sep 2015 by Youssra Mehanna
I have in each aspx a filter part which include different types of controls(textbox,radiobutton,checklist...) And when user change the value of any control in filter body this new value will be saved as default for current user and when close the session or rendering the page this new values...
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...
19 Aug 2015 by Member 3393148
I want to know, Which is the best distributed cache technique for 64 bit win 2012 server
13 Jul 2015 by Sem.Shekhovtsov
Setting up Redis server on Windows machine, and accessing it with C# client
12 Jul 2015 by Sem.Shekhovtsov
Caching the entire asp.net 3.5 web forms page using modules.
18 Jun 2015 by ZurdoDev
See the documentation, https://msdn.microsoft.com/en-us/library/system.runtime.caching.memorycache(v=vs.110).aspx[^]
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[^]
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...
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.
9 Jun 2015 by Member 7995415
Hello.I want to develop an application for displaying Result of Students. The result is once compiled than do not incorporate any change in it.I have heard about the Caching in ASP.NET. Almost 1 Lac users expected on the same time once application goes live. So i want that each time...
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....
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...