inkredible Posted February 19, 2017 Posted February 19, 2017 Hello, I am facing the issue that my application's javascript is being cached for approx. 5 minutes, so I need to wait 5 minutes everytime to check my javascript changes. It is not locally cached (I have made this sure by hard refreshing + trying to load the page in a new incognitow instance). I think the caching happens because IPS merges all javascript files into one file. I think it makes sense to reload the javascript more frequently if the forum is set to the dev mode.
CodingJungle Posted February 19, 2017 Posted February 19, 2017 in in_dev, the files are added fresh from their respected /dev/js folder. this could be opcache, try disabling it in you php.ini. if you are using chrome, you can have it disable cache if the console is open.
GriefCode Posted February 19, 2017 Posted February 19, 2017 4 hours ago, CodingJungle said: in in_dev, the files are added fresh from their respected /dev/js folder. this could be opcache, try disabling it in you php.ini. if you are using chrome, you can have it disable cache if the console is open. Just to add, using an incognito instance is not disabling the browser cache. The files are still cached and loaded from the cache. Just to determine it easier for you, you can disable the cache here in the console: Keep in mind the console need to remain open as this is required. A side note, if you have cloudflare in front or a similar service, make sure to enable dev mode.
inkredible Posted February 19, 2017 Author Posted February 19, 2017 I don't have Opcache, Xcache or similiar installed on my devforum. I have also tried the disable cache option which didn't help either. We don't use a CDN which could cache files. However, I am still convinced it is IPB which is caching my file because: applications/botuserpanel/dev/js/front/controllers/botuserpanel/botuserpanel.main.js <- My original js file which is always up to date/never cached and this is the path used by IPS for my javascript: applications/botuserpanel/dev/js/front/controllers/botuserpanel/botuserpanel.main.js?v=3e4897b7b9
bfarber Posted February 20, 2017 Posted February 20, 2017 According to what you are saying, we simply add a v=XXXXXX parameter..we are still loading the file directly. With IN_DEV enabled, we don't cache javascript files. If you are seeing caching, it's due to your browser cache or similar (i.e.Cloudflare).
TDBF Posted March 5, 2017 Posted March 5, 2017 On 19/02/2017 at 3:47 AM, inkredible said: Hello, I am facing the issue that my application's javascript is being cached for approx. 5 minutes, so I need to wait 5 minutes everytime to check my javascript changes. It is not locally cached (I have made this sure by hard refreshing + trying to load the page in a new incognitow instance). I think the caching happens because IPS merges all javascript files into one file. I think it makes sense to reload the javascript more frequently if the forum is set to the dev mode. Which Browser are you using for development? It could be a caching issue from due to your browser (Firefox is known for this) and I find that if you clear you browser cache with CCleaner (for example) you might find it will resolve this issue for you. I personally use Firefox's Developer edition browser because of the issues I have had with caching in the past.
inkredible Posted March 21, 2017 Author Posted March 21, 2017 On 5.3.2017 at 5:36 AM, TDBF said: Which Browser are you using for development? It could be a caching issue from due to your browser (Firefox is known for this) and I find that if you clear you browser cache with CCleaner (for example) you might find it will resolve this issue for you. I personally use Firefox's Developer edition browser because of the issues I have had with caching in the past. I am using Chrome and I have just 100% assured myself again that it's not something locally cached. @bfarber I have checked it a couple times now, the javascript version with the appended v=XXXX parameter is an older/cached version of the original js file. When I call the URL with the original JS file (basically removing the v parameter from the URL) it is the noncached/updated file. I have still no idea what is causing this, but I have to admit that I blame the IPS Framework for it right now.
bfarber Posted March 22, 2017 Posted March 22, 2017 The v=X parameter is purely there for cache-busting in the browser. It does not impact the response from the backend.
BomAle Posted March 23, 2017 Posted March 23, 2017 also I have two file js with different url... one is from database and one from dev folder. I will upload screenshot tomorrow.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.