Questions tagged [caching]

A cache is a mechanism for temporarily storing (caching) data locally in order to reduce access time to data stored far away. For CPU/disk/web browsing please use relevant tags (cpu-cache, diskcache,...)

A cache is a mechanism that involves temporarily storing data in places that are faster to access than the original storage location. can be machine code instructions, images, documents, or web pages, for example. The purpose of a cache is to reduce access time, bandwidth usage, server load, and perceived lag.

Different applications where cache mechanisms are used include:

Useful Links

37958 questions
11
votes
1 answer

Flutter video caching for 10 seconds on next 4 videos

Does anyone know how to do Flutter Video Caching in List for 4 to 6 seconds? (For next 5 videos) like Instagram reels. Is there any way to do it? I had taken PageView.builder to show a video with a full page. I have tried one cached_video_player but…
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
11
votes
0 answers

Webpack refreshing whole cache after exception: [PackFileCacheStrategy]: Cannot read property 'hasStartTime' of undefined

We have a project using Typescript and Vue 3.1.5 and Vue CLI 5.0.0-beta.2 which in turn uses Webpack 5.47.0. For development the startup of vue-cli-service serve was really slow (lots of dependencies). So we activated the Webpack filesystem…
wuerg
  • 1,022
  • 12
  • 12
11
votes
4 answers

trying to store java objects in contiguous memory

I am trying to implement a cache-like collection of objects. The purpose is to have fast access to these objects through locality in memory since I'll likely be reading multiple objects at a time. I currently just store objects in a java…
jbu
  • 15,831
  • 29
  • 82
  • 105
11
votes
2 answers

Cache-Control Header Modified By PHP Session?

I'm outputting an image to the browser using a Zend_Controller_Response object. It is my intention to apply caching to the image, however something is causing the Cache-Control header to be overwritten. My code is as follows: $this->getResponse() …
Kieran Hall
  • 2,637
  • 2
  • 24
  • 27
11
votes
0 answers

Clear browser cache for CORS

I need to clear the cache for one file in Chrome. I was setting up loading a font from my own CDN, and added the cache-control: public, max-age=31536000, immutable header. However, I did not setup CORS correctly, so I got a CORS error. Now, that…
11
votes
2 answers

Caching FileInfo properties in C#

From the MSDN documentation for the FileInfo.Name property, I see that the data for the property is cached the first time it is called and will only be updated subsequently by using the Refresh method. I've the following questions which I can't find…
Iain Sproat
  • 5,210
  • 11
  • 48
  • 68
11
votes
1 answer

Why is caching WCF channels a bad thing?

I've been reading a lot of WCF articles online and it seems like most people cache the ChannelFactory objects but not the channels itself. It appears that most people are afraid to use channel caching because they don't want to handle the network…
Bart
  • 167
  • 1
  • 6
11
votes
2 answers

Apollo client issues in next.js , javascript, graphql, react js

If I visit home page at first or refresh the home page, I can't get profile in resolver because cache.readQuery is not working. As well as it calls the api infinitely. If I move to another page and comeback to home page again, cache.readQuery works…
i-Guru
  • 164
  • 4
  • 25
11
votes
3 answers

Is the ASP.Net Cache shared between different user sessions?

In a page if I do the following: Cache["key"] = myObject; Is that cached object available for requests that are for other users?
tpower
  • 56,100
  • 19
  • 68
  • 100
11
votes
4 answers

PHP Caching - Is it faster to save in database or create a file?

I am currently caching dynamically generated PHP pages by saving them to a database with an expiry time field. If the page is requested again, the program checks for a unexpired cached version of the page to serve up, and only regenerates the page…
Dan
  • 2,073
  • 3
  • 22
  • 30
11
votes
2 answers

Outputcache: VaryByHeader="User-Agent" or VaryByCustom="Browser"?

I'm not sure about the differences between VaryByHeader="User-Agent" and VaryByCustom="Browser". Is it right that the latter will create less cached pages? Or in other words, if I wish to cache only for different browser-types (and versions), the…
sl3dg3
  • 5,026
  • 12
  • 50
  • 74
11
votes
2 answers

What is guaranteed with C++ std::atomic at the programmer level?

I have listened and read to several articles, talks and stackoverflow questions about std::atomic, and I would like to be sure that I have understood it well. Because I am still a bit confused with cache line writes visibility due to possible delays…
11
votes
3 answers

php caching techniques

Hi this is more of an information request really. I'm currently working on a pretty large event listing website and have started thinking about some caching for the data sets being used. I have been messing with APC this week and have seen some real…
Mike Waites
  • 1,688
  • 3
  • 19
  • 26
11
votes
7 answers

file_get_contents getting wrong results

Update I solved the problem and posted an answer. However, my solution isn't 100% ideal. I would much rather only remove the symlink from the cache with clearstatcache(true, $target) or clearstatcache(true, $link) but that doesn't work. I would also…
Dan Bray
  • 7,242
  • 3
  • 52
  • 70
11
votes
2 answers

Cannot access manifest-cached files with AJAX from webapp saved to Home screen in iOS devices, using jQuery.ajax()

I'm making a webapp. Some of the files that it loads contain pure, static .JSON data. I am using jQuery.ajax() (jQuery 1.5.2) with dataType:'json' and cache:true. Everything works well and all files are loaded. I have also configured the cache…
ampersand
  • 4,264
  • 2
  • 24
  • 32
1 2 3
99
100