Latest Questions tagged Caching

Browse all latest questions tagged Caching

103
Votes
Published 25 Aug, 2022
Java - Unable to configure second level cache of hibernate-ehcache-4.3.5.Final.jar in Hibernate 5.1.0.Final

I'm trying to achieve second level cache in my Java EE project using Hibernate. My Hibernate version is 5.1.0.Final. I've created a table employee in my MySQL database. I've included hibernate-ehcache...

63
Votes
Published 20 Jun, 2022
Reactjs - Cache busting with CRA React

When I updated my site, run npm run build and upload the new files to the server I am still looking the old version of my site. Without React, I can see the new version of my site with cache-busting...

84
Votes
Published 17 Aug, 2022
Python - How can i write python decorator for caching?

I'm trying to write python decorator for memoize. I have few questions. How does @memoize translate to memoize class's call function? Why does init expect an argument. Where is the cache stored? Is...

34
Votes
Published 11 Aug, 2022
Jquery - Removing querystrings from the URL before page refresh

After a new user signs up, I need to redirect the user to the home page and display a twitter-style welcome message. I initially tried using the jquery cookie plugin to store my message and display i...

95
Votes
Published 24 Aug, 2022
Python - Clear Python cachetools manually

In this class I have a method which I cache its result using cachetools: from cachetools import cached, TTLCache class Log: @cached(TTLCache(maxsize=200, ttl=300)) def get_sessions(self, use...

22
Votes
Published 15 Apr, 2022
React - How to specify a Cache-Control header for index.html in create-react-app

I'm trying to follow the guidance on create-react-app.dev's Production Build documentation: To deliver the best performance to your users, it's best practice to specify a Cache-Control header for ind...

27
Votes
Published 01 May, 2022
Python - Get list of Cache Keys in Django

I'm trying to understand how Django is setting keys for my views. I'm wondering if there's a way to just get all the saved keys from Memcached. something like a cache.all() or something. I've been try...

51
Votes
Published 03 Jun, 2022
Python - Python lazy evaluator

Is there a Pythonic way to encapsulate a lazy function call, whereby on first use of the function f(), it calls a previously bound function g(Z) and on the successive calls f() returns a cached value?...

71
Votes
Published 29 Jul, 2022
Python - How to clear all caches in Apache?

I have a django app running in a virtualenv on Windows 10 WSL1 (Ubuntu). The python version is 3.6.8. When using the django development web server, python manage.py runserver, everything is fine. I...

47
Votes
Published 17 Aug, 2022
Python - Django cache_page checking

How can I confirm my Django views are being cached when I use the cache_page decorator like so: @cache_page(60) def my_view(request): Ideally I would like to output cache hit/miss messages in the c...

30
Votes
Published 13 Aug, 2022
Jquery - Does jquery require timestamp on GET Calls in IE7?

Please see the jQuery code below, it used to paginate some search results paginate: function() { $("#wishlistPage .results").html("<div id='snakeSpinner'><img src='"+BASE_URL+"images...

115
Votes
Published 04 Aug, 2022
Jquery - Why my Mobile Safari cache won't clear?

I'm trying to debug a site on my iPhone4 (iOS4) iPad1 (iOS3.3) and desktop. My problem is I cannot clear the iPhone cache at all. If I add alerts/consoles to the js files I'm debugging, they show up...

6
Votes
Published 01 May, 2022
Python - Python cache dictionary - counting number of hits

I'm implementing a caching service in python. I'm using a simple dictionary so far. What I'd like to do is to count number of hits (number of times when a stored value was retrieved by the key). Pytho...

18
Votes
Published 23 Jun, 2022
Python - How can the memoize cache be cleared?

I use the following decorator to cache pure function returns: def memoize(obj): cache = obj.cache = {} @functools.wraps(obj) def memoizer(*args, **kwargs): if args not in cache:...

16
Votes
Published 23 Apr, 2022
React - How to cache fetched data in react without redux

I know, using Redux I have common store and when I change my location, for example I went from /videos page, but I still have fetched videos in my videos reducer. So if I then decide to go back to my...