Questions tagged [caching]

A cache serves as a system for temporarily storing data locally to improve the speed of accessing remotely stored information. For optimal tagging, please use relevant labels such as "CPU-cache," "diskcache," or "web-browsing."

The challenge of Vue.js caching: NPM Build fails to update hash for single page application Vue.js app on Production server with Nginx

We currently have a Vue.js version 2.6.40 application running as a Single Page Application (SPA) with Laravel serving as the backend API. When we execute the npm run build command, it outputs files to dist/* directory with consistent hash values for each f ...

Is your PHP session_cache_limiter malfunctioning on Safari?

I've been working on perfecting the session management for my PHP-based online ordering system. I am pleased with how it currently functions, allowing users to navigate using the "back" button without causing any database issues. However, one thing t ...

Storing the response data in the cache of a NextJS API route

Currently, I have an API route set up in NextJS that follows these steps: Fetches news data from a third-party source using the "fetch" method Makes a call to Google Translate to convert the fetched data (also using fetch) Returns the translated data The ...

It appears that React Query is not retaining cached data

After watching a tutorial on YouTube about utilizing React Query, I attempted to implement caching in my project. However, the data is fetched every time instead of being retrieved from the cache. I've reviewed my code and can't pinpoint what I&a ...

Following the completion of the Nextjs Build process, my next task is to change the name of

Following the completion of the Nextjs Build process, I am looking to change the name of the chunk file and replace the cached data with new data. However, I have encountered an issue where the manifest.json still points to the original chunk file. How can ...

Tips for preventing caching on particular Nextjs API routes

In my Next.js application, I have an API route at /api/auth/signout that is responsible for clearing a specific cookie and returning JSON data. The issue arises when I deploy the project to Vercel - initially, this API route works correctly by clearing th ...

Storing an array within an AngularJS service for better performance

As someone who is relatively new to AngularJS, I am still in the process of understanding how to utilize services for fetching data in my application. My aim here is to find a method to store the output of a $http.get() call that returns a JSON array. In ...

Updating the sidebar server component in a messaging application using NextJS 13

For a complete minimal reproducible repository, visit this link. This application is a chat app that features the following routes: /chat layout.tsx - server component containing the Sidebar which is also a server component /chat/[id] - client compone ...

Issue with caching when using lazy loading with Angular 2 components

When naming Angular 2 lazy loaded components, they are designated as 0.js, 1.js, etc. However, the entry point is given a version prefix while all lazy loaded components keep their original names. This leads to discrepancies in the code versions present ...

Storing values as JSON in Redis: A comprehensive guide

In my application, I have implemented Redis as the caching store. Below is the configuration setup for Redis: @Configuration @EnableCaching public class SpringRedisConfig { @Bean public JedisConnectionFactory connectionFactory() { JedisConnectionFacto ...

Performing optimized searches in Redis

In the process of creating a wallet app, I have incorporated redis for storing the current wallet balance of each user. Recently, I was tasked with finding a method to retrieve the total sum of all users' balances within the application. Since this in ...

Symfony: optimizing performance with kernel->loadClassCache and rendering multiple controllers

Hey there! I have a query regarding caching and rendering controllers. I've implemented $kernel->loadClassCache() in my app.php file to enable app caching. It's working fine as my site is now performing much faster :). However, I'm facing an issue wit ...

What is the best way to retrieve web pages from the cache and automatically fill in form data when navigating to them from different pages on my website?

On my website, I have multiple pages featuring forms along with breadcrumbs navigation and main navigation. Interestingly enough, the main navigation and breadcrumbs share some similarities. However, my desire is that when users click on breadcrumb links, ...

Troubleshooting a Cache Issue in Your Next.js Application

Whenever I attempt to run 'npm run build', an error crops up that seems to be linked to the css and fonts. Unfortunately, I am unsure of how to tackle this problem. It's perplexing as the app functions perfectly fine in development mode. The error generat ...

Challenge with the revalidateTag() function in Next.js app routing and Sanity integration

I have been struggling to integrate the next app router with Sanity and revalidateTag() function. It has been a challenging journey as I tried to make it work for five full days across multiple projects. Here is what I have discovered so far: Project 1: T ...

The app router in Next.js version 13.5+ has a server component that effectively disables caching

I am facing an issue with my profile screen rendering based on cookies. The problem occurs when the cookie is not present or invalid, as it renders a login link. Even after the user logs in and returns to the profile page, the login link continues to appea ...

Angular - optimizing performance with efficient HTTP response caching tactics

I'm managing numerous services that make requests to a REST service, and I'm looking for the optimal method to cache the data obtained from the server for future use. Can someone advise on the most effective way to store response data? ...

The yarn cache occupies a significant amount of storage

Just a few minutes ago, I was completely shocked to discover that the Yarn cache located at /Users/user/Library/Caches/Yarn is consuming over 50GB of my precious disk space. Why are there so many packages stored on my computer? While I appreciate Yarn&apos ...

Managing Cache Misses and 'no-cache' Rules in Amazon CloudFront

As I delve into my latest Next.js project, I've encountered an issue with certain pages that have cache headers configured as cache-control: no-cache, max-age=120, must-revalidate. Surprisingly, despite these settings, CloudFront seems to be consistently ...

Are HTML files and PHP generated files cached differently by web browsers?

My current setup involves Nginx as a web server and Firefox to check response headers. I added two files on the server - test.html and test.php, both containing the same content. In the Nginx config file, I have set the expires directive to 30d in the serv ...

The following 13 pages are static and non-responsive

Hey there, presenting one of my pages in next 13 from the app directory : import { cookies } from "next/headers"; import Link from "next/link"; import styles from "@/styles/chatPage/ChatPage.module.css"; import ChatClient from ...

Storing/Caching API Requests with NUXT.JS

I am in the process of developing a NUXT.JS application that retrieves JSON data from an API called Storyblok. I would appreciate some advice or suggestions on how to efficiently store/cache the API response to avoid making multiple requests when navigatin ...

Ways to refresh the cache after performing delete, update, or add operations on data

I currently utilize a data caching tool called cache-all. However, I have encountered an issue where newly added information does not appear when displaying all data after the addition. To ensure that new data is immediately reflected in requests, I typica ...

AJAX cached outcomes

Trying to educate myself on AJAX using w3schools.com, but struggling with a particular example: xhttp.open("GET", "demo_get.asp", true); xhttp.send(); In the above example, there might be a cached result. To prevent this, you can include a unique ID in t ...

What are the best ways to store internal files in node.js for faster access?

I have been utilizing routing functions like the one mentioned below to replicate the overall design of my website (A.jade): exports.overview = function(req, res, next) { res.render('A', { main: jade.renderFile('./views/B.jade' ...

The site cache appears to be deactivated, but the source of the deactivation remains unclear. Can you help identify the issue?

On my PHP website, the <head> tag in the HTML includes: <meta http-equiv="Cache-Control" content="max-age=300"/> However, when checking the headers, it shows: Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre- ch ...

Retrieving stored data from the cache using CodeIgniter

I am working with two functions in my controller. The first function retrieves information from the database and caches it, while the second function passes this cached data to a view named form. However, I encountered an issue when trying to output this i ...

Why does Chrome consider this file a document, but Firefox sees it as an image?

I am experiencing an issue with the download GET endpoint in my Express app. Currently, it reads a file from the file system and streams it after setting specific headers. Upon testing the endpoint in Chrome and Firefox, I noticed that the browsers interp ...

Is it possible to implement pagination using 'useSWR' in combination with the contentful-client?

I am currently working on implementing pagination in a Next.js project using the useSWR hook. My approach seems to be functioning correctly, but I have a concern about caching due to the key parameter not being a unique string as recommended in the documen ...

Can caching be utilized to optimize the speed of npm ci?

Currently, the preferred method for installing node modules during Continuous Integration is by using npm ci. However, this process tends to be quite slow. Is there a way to accelerate the speed of npm ci by utilizing cache or avoiding the complete remo ...

What is the correct method for caching fonts within an Angular application?

In the process of developing a web application similar to photoshop-minis using Angular, one key aspect I am focusing on is reducing load times. Particularly when it comes to fonts, as not all necessary fonts are available through Google Fonts. Instead of ...

Caching pages in Rails can greatly improve the performance of your

When it comes to updating content with pagination in my action, I currently employ the following method: render :json => { :content => render_to_string( :partial => '..' ), :pagination => render_to_string( :partial => '' ) }, :layout => ...

Ways to conditionally display a component in Next.js without the issue of caching CSS styles

I'm a newcomer to Next.js and I'm still trying to wrap my head around how the caching works. Let's take a look at this simplified example: An index page that displays either Test1 or Test2 components, based on whether the current minute is ...

Issue with Cache in VueJS Application on Windows Server 2016 Running IIS 10

I am currently running a VueJS application on a local IIS 10 server for internal company use. However, I've encountered an issue where the index.html file seems to be cached, requiring manual browser clearing to see updates. I have read about potential s ...

What are the steps to store a page in cache with AngularJS RouteProvider?

In my AngularJS project, I have implemented a Master > Details page using RouteProvider. The Master page features a unique form of "infinite scrolling" where data can be dynamically added and removed at both ends. For instance, if the user is viewing a Con ...

Unable to utilize browser caching on WordPress with .htaccess file

Here is the code snippet from my WordPress .htaccess file that I am using: ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType imag ...

jQuery/AJAX caching problem

I have a question regarding retrieving data using $.ajax multiple times. I am facing an issue where the data is not getting refreshed with each call, instead I am receiving the same old data every time I make a call to $.ajax. Surprisingly, this code was w ...

Storing JSON data in an array and using the IDs to dynamically fill in the corresponding types

My function retrieves attribute ids along with their corresponding names in JSON format. Here is an example: { "DETAILS": [ { "ATTR_ID": "522", "ATTRIBUTE_ID": "4222", "ATTRIBUTE_TYPE": "email", }, ...

Revamp website to meet modern Web 2.0 standards

I am looking to revamp my old ASP classic website to meet the modern standards of web2.0 using PHP. Currently, my main website page features sections that need to display the latest updates such as recent forum threads, news articles, and user comments. In ...

Is the JavaScript file not being stored in the cache?

As I work on optimizing my web application, I am facing a challenge with a javascript file size of approximately 450K even after compressing it. While I intend to redo the javascripting in due time, for now, I need to go live with what I have. Initially, I ...

What is the best way to bust the cache for my Vue applications that are deployed on Ngin

Greetings! I am facing an issue with my Vue apps deployed on an nginx server. Sometimes, updates do not reflect for users due to cached versions. Is there a way to clear the cache without renaming all files and components in the apps? Are there any user-f ...

The browser is only showing particular changes made to the CSS file

I'm currently working on a web project and have the following CSS and HTML code: style.css: body { background-color: red; font-size: 14px; font-family: Roboto,arial,sans-serif color: gray; } img { height: 92px; width: 272px; ...

Exploring the feature of On Demand Cache Revalidation in Next JS 13 with a remote ASP .NET Core backend

Seeking guidance on leveraging NextJS cache revalidation for a specific use case that seems unique. Currently, I am in the process of developing an online food ordering platform where numerous restaurants (currently 30) can publish their menus for customer ...

Prevent Next.js 13 from caching Firebase response or query result

I've created an API route located at: app/api/notes/route.js import db from "@/utils/firebaseDB" import { collection, getDocs } from "firebase/firestore"; export const GET = async (request) => { let posts = [] try { ...

Don't forget to keep track of when the user has closed

How can I ensure that the cache retains the user's action of closing the div? Currently, when I close the div and refresh the page, it reverts back to its original state. Is there a way to make this change persistent? Experience it live: Here is the HTML ...

Issue with the maximum cache size in Next.js causing excessive API calls

In my experience with Next.js, I've encountered a frustrating limitation on cache size for fetch requests. The 2MB limit means that some of my fetches exceed this threshold and end up not being cached. This becomes particularly bothersome because every tim ...

The data retrieved through ajax remains consistent every time

It seems like there might be a server-side cache causing issues on my server... Every time I make a request for content using jQuery AJAX, I receive the same data, even after replacing the server-side code with echo('hello, world!'); The confi ...

Enhancing SCons Cache Copy Operation

Looking for a solution to modify the behavior of SCons when copying artifacts from the cache directory to using hard links. Here is what I have tried: def link_or_copy_file(class_instance, src, dst): # perform hard linking instead... SCons.Defaults. ...

I need help resolving this issue with OpenShift: ImportError - libmemcached.so.11 file cannot be located

I am using a python 2.7 cartridge with the Django framework and I want to integrate memcached into it. I have added the Memcached Cloud cartridge to my app and followed this guide to set up my project. In order to utilize the Django caching backend 'BACKE ...

What is the best way to incorporate sub-template caching in Kohana framework?

Currently tackling a caching issue within my Kohana project when trying to cache a sub-template from a single page. The challenge lies in dealing with both static and dynamic sections within the same page structure. My approach involves utilizing nested vi ...

What is the best method for saving a JSON resource on my device?

When I make a JSON request, it provides me with various parameters, one of which is the name. I want to create a variable to cache this name parameter so that I can access it later in my app. For instance, if the name from JSON request is "david", I would ...

Exploring Angular2: A demonstration showcasing concurrent http requests (typeahead) using observables

Currently, I am working on several cases within my app that require the following sequence of events: Upon triggering an event, the desired actions are as follows: List item Check if the data related to that context is already cached; if so, serve cache ...

Troubleshooting Vercel's caching of CORS headers across different domains

I currently have a Next.js API hosted on Vercel that is being utilized by various domains. One issue I'm facing is when the browser sends the If-None-Match header, Vercel replies with a 304 status; however, the Access-Control-Allow-Origin header may conta ...

Is the getServerSideProps method filled with data if it already has a cached result from an API request?

I am considering using nextjs for an upcoming project. The frontend of this project will be a React application that utilizes getServerSideProps. Initially, the frontend will not have any content to display, as the server side props dictate which UI should ...

Guide on dynamically caching a Server Side Rendered Page in Next.js with Dynamic Routes

I am in the process of deploying a Next.js Application on AWS using ECS/Fargate because I have specific requirements that prevent me from using Amplify for custom logging and monitoring purposes. My application utilizes api-routes and dynamic-routes with S ...

Issue with CORS on Next.js static files leading to broken links on version 10.1.4

Currently, my Nextjs application is fetching its static files from Cloudfront. During deployment, I upload the /static folder to S3. After updating to version 9, I encountered a strange problem where some of my CSS files are triggering a CORS error: Acces ...

Is it considered safe to delete the npm-cache folder on a Windows system?

When running npm cache clean -f, I noticed that it was not able to fully clear the npm_cache folder located at C:UsersjerryAppDataRoaming pm-cache. It only cleared some of the files within this directory. The command output displayed a warning messag ...

How to implement caching for Stripe JS V3 in Next.js with Server-Side Rendering

I am utilizing a getServiceSideProps function to display a complex APP that interacts with an API: const MyApp: NextPage = (props: any) => { let stripePromise: any; const getStripe = async () => { if (!stripePromise) { str ...

Angular Universal - Preserving server-side requests for efficient client-side caching

After reading multiple articles on caching data for client in angular universal apps, I am still puzzled about how the data is transferred from server to the client. Should I inject the JSON into pre-rendered HTML or could there be another method that I' ...

I am encountering issues where none of the NPM commands are functioning properly even after updating the

For a few months, I have been using npm without any issues. However, once I installed python/django and created a virtual environment, npm stopped working altogether. An error message similar to the following is displayed: sudo npm install -g react-nativ ...

Improving Page Load Speed with HTML Caching: Strategies for Enhancing Performance when over half of the data transferred is for navigation menus

I manage a complex and expansive website that contains a significant amount of repetitive HTML elements such as the navigation menu and top ribbon. Loading a single page on my site can be resource-intensive, with up to 300KB of data required, half of whic ...

Polling database from various browser tabs

Working on a .NET/angular application that regularly checks the SQL Server database for updates, with the user able to customize the polling interval starting from 10 seconds (as per business requirements). The issue arises when each new tab opened by a ...

Utilizing Express JS to Optimize JPEG File Loading with Cache Headers

I have been working on implementing Cache-Control for my static image files. I have successfully set this header for HTML and JS files: https://i.stack.imgur.com/9VuWl.png However, I am facing challenges with JPEG files: https://i.stack.imgur.com/p52jm. ...

Caching HTML5 videos in Google Chrome

I am currently in the process of building a website and have successfully added an HTML5 video. However, I encountered an issue when attempting to change the video file in the background for users to upload a new one. Despite updating the video URL, Chro ...

Efficient PHP caching solution for optimizing JavaScript and CSS performance

I'm facing a unique challenge that I can't seem to solve through typical Google searches. I'm in the process of consolidating all my javascript and css into separate php files using require_once() to pull in the content. The structure of my javascript file ...

Vue Progressive Web App pre-caching routes for improved performance

Seeking guidance to ensure I'm on the right track. I've developed a simple web application using Vue CLI with PWA support. Everything appears to be functioning properly, including the install prompt. My objective is to cache certain pages (route ...

Exploring the benefits of APCu, Zend Cache, and setting up virtual

Recently, I have been experimenting with APCu user data caching in PHP 5.5 using Zend Cache from ZF1, along with Apache virtual hosts (using mod-php). Surprisingly, I encountered some unexpected outcomes during my tests. Interestingly, when I added data t ...

Which is more efficient: Implementing caching on the frontend or on the

Currently, I am using ajax to send requests to the backend server, where operations are performed and responses are received: function getData() { new Ajax().getResponse() .then(function (response) { // handle response }) .catch(functi ...

Storing Data in next-js Cache

Has anyone else encountered issues with data caching in Next.js 14? I have a page (/lib/fetchData.js) where I'm attempting to implement caching, but it seems like the data is always being fetched from the source instead of the cache. Any ideas on what co ...

Comparing the Efficiency of Caching JSON Strings and Java Objects

One of the strategies I use in my web services is caching the result with memcached. I have two options for caching: either cache the resulting JSON or cache the source object. However, when caching the source object, I need to convert it to JSON every t ...

Local Wordpress pages have ceased to function on my computer

While managing my WordPress website, I had previously installed a quick cache plugin on my XAMPP server localhost. However, all of a sudden, the pages stopped working. The site is currently not hosted online but running on my local machine. Upon inspectin ...

Exploring Nuxt.js: A guide to server-side caching of axios calls for universal client access

I am currently working on a project using Vue and Nuxt.js. I am wondering if there is a way to cache an axios web service call for all clients. Specifically, I need to retrieve currency reference data and it seems inefficient for every client to make this ...

Issue with disabling cache in Symfony using the config.yml file is not resolving

As a beginner with Symfony, I am currently working on a project that involves making UI changes. However, I am facing an issue where the changes I make are not reflected on the screen until I manually delete the cache files located in app/cache. While this ...

Tips for getting a browser to clear the cache specifically for the .html files on your website

After making updates to a client's website, I'm encountering an issue where the browser is displaying a cached version of the site. The website consists of static .html files. Although clearing my browser's cache resolves the issue for me, I would like to ...

PHP Partial Caching refers to the practice of storing and

I am looking to partially cache some php files. For example: <? echo "<h1>", $anyPerdefinedVarible, "</h1>"; echo "time at linux is: "; // starting not been cached section echo date(); //end of partial cach echo "<div>goodbye $footerV ...