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...
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...
"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...
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): ...
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 ...
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...
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...
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. ...
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. ...
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.
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...
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...
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...
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?
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...
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...
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...
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...
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...
using System.Data; namespace MyNamespace { public sealed class MyData { private static readonly MyData instance = new MyData(); private DataTable data; public DataTable Data { get ...
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...
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...
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...
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];...
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.
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...
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.
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...
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.
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.
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...
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...
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
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...
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...
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...
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.
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...
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 =...
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...
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...
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...
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.
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.
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...
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...
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...
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...
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...
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...
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...
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...
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:
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...
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...
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...
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...
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...
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.
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...
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...
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[^]
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...
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.
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...
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....
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...