Jump to content

Disable caching in Dev mode


inkredible

Recommended Posts

Posted

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.

Posted
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:
58a95cba9c88f_ScreenShot2017-02-19at09_51_56.thumb.png.01f17cb0baa817b92299242e6054fce0.png

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.

 

Posted

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

 

Posted

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).

  • 2 weeks later...
Posted
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.

  • 3 weeks later...
Posted
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.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...