Nginx + CakePHP cache issue - cakephp

We are deploying a CakePHP application to nginx(1.2.4).
There was an issue with the view files, it does not refresh the latest view files.
It seems like the views are always cached, and I have to clear the browser cache in order to load the updated content.
I tried to disable in CakePHP, but the problem remains.
Anyone encountered this issue before?
EDIT
At the end, we figured that it is causing my the conf file under site_ available folder

http://book.cakephp.org/2.0/en/controllers.html#Controller::disableCache
http://book.cakephp.org/2.0/en/controllers/request-response.html#interacting-with-browser-caching

Check if you set debug to level to something different than 0. Debug level other than 0 sets cache for couple seconds automatically so you should be able to see latest changes for your views.

Related

DNN 9 Module only displays in Edit Mode

We recently upgraded an old DNN site to the latest version (9.8.00). Everything has been running fine for the most part, but today I have ran into an issue I can't figure out how to resolve. Once of my users dropped an HTML module on the page but we can not get it to display outside of edit mode. I have tried adding an HTML module to other pages as well to see if it was isolated to an individual page, but it's doing the same thing across the entire site. I have tried all of the following things to no avail.
Debugged the page to make sure no errors where being thrown and none are.
Stopped inheriting permissions and made the module visible to all users.
Changed the Cache settings for the module to 0.
Verified the site was running on .Net 4.5.1 (I'm actually on 4.7.1).
Tested two other modules (link and event), both of these modules display outside of edit mode.
I am at a loss at this point. The HTML module is showing as version 9.8.0, but has an upgrade version as 10.0.3. So I'm not sure if that means it needs to be upgraded or it has already been upgraded.
Any help would be greatly appreciated.
Recents versions of the HTML module have this behaviour: they doesn't appear when they haven't any content. After you add some content, they keep displayed.
I think this feature is related to the default template which is containing an empty HTML module.

Can synchronised browser testing be achieved when the user script (Tampermonkey) is developed locally?

I am developing a user script (Tampermonkey) locally. When the local JS changes, I want to automatically refresh the target URL of the user script instead of a local HTML file.
How can this be achieved? I checked every command and configuration information, but did not find a solution, so I came to ask for help.
The method of developing UserScript locally is seen here. The answerer mentioned that browser-sync can be used, but I did not find a way to achieve it.
livereload can solve this problem very well, because livereload is implemented through browser extensions and local programs. When the file changes, the target URL can be refreshed immediately.
http://livereload.com/
https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei/related

Drupal 7 - Cannot delete content

This is rather odd: I am suddenly unable to delete content from my Drupal 7 website.
I can no longer delete any content, regardless of the content type. When I click delete and confirm, I return to the content overview, but the items are still there (and accessible). No errors, no warnings, no error logs. Flushing the cache does not help. I'm logged in as admin, so I cannot be a permission-issue. The url aliases however are deleted, the nodes themselves not.
I haven't done any core hacking, or installed weird modules, it's a rather basic Drupal installation. Any thoughts on how to delete content again, or how I can try to figure out what's happening here? Much appreciated!
I had this same issue. I checked the 'error log' and saw a possible conflict with the "Heartbeat Plugin" part of the "Heartbeat" module. As soon as I turned that plugin off (via the "modules" section), the issue was resolved.

App Engine doesn't recognize file change

Often times when i make small changes in my python or html file and upload it to Google App Engine, the changes doesn't seem to apply. I tried clearing my browser cache, and refresh, but still can't see the small change i made in my html file. How do i fix this? how do i know that the changes get uploaded?
Major changes seems to get updated just fine. But if i change a character for example, it doesn't get uploaded. I can't seem to see the change after clearing my browser cache. So, i assume it doesn't get uploaded. Anyone has experience with this?
Does the version in app.yaml match the version that's selected as default in the admin console? A mismatch would explain what you're seeing.
I had the same problem in Java with eclipse. I had to clear all my project and close eclipse, reopen it and deploy my app to appEngine..
Hope it help you

Prevent Silverlight 3 from caching while debugging

I'm assuming the issue I'm having is related to caching. Code changes I make are not getting picked up when I debug. Most times I get served a previous version of the app. How do I prevent this from happening?
Ctrl+F5 is an easy way to refresh a page and clear the cache of that page at the same time - it may help :)
Try to add to the page that hosts Silverlight application on Page_Load:
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-100));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Append a "version" querystring to your XAP Url, something like:
http://localhost:1234/ClientBin/my_silverlight_app.xap?v=1.0.287.5361
This will trick the browser (and many web servers) to think that this is a different file. And when the cache problem appears again, increase the number.
If you then want to employ proper caching, do it on the server-side with OutputCache directives.
As far as I see, this seems to be a problem with Firefox - when I used IE8, this didn't happen to me (I realize this may open its own can of worms, but at least for debugging and testing Silverlight, IE is much better)
I have not had any issues with Silverlight assemblies getting cached - you might want to try debugging the HTTP requests that go back and forth, to see if maybe your server is instead returning incorrect information to the browser (e.g. a "not modified" response).
For general no-cache behavior, the only reliable method I have found is to turn off caching in the browser.
For IE, this has been the only reliable option - otherwise, even if proper no-cache headers are sent, certain things are still cached (specifically, dynamically loaded resources which are accessed via Javascript XmlHttpRequest). I have not specifically had issues with Silverlight getting cached when it should not, though - IE has always loaded the latest updates even if cache is enabled.
Firefox has been much more problematic - even when disabling cache, it still sometimes caches XmlHttpRequest-loaded resources. Manually hitting Refresh a few times has been the only solution in such a case. Once again, I have had no issues with Silverlight assembles, even if cache is turned on.
In Firefox, I use the 'web developer' plugin and simply select to 'disable cache'. Works fine.
Firefox 3.5 under Tools has the option for Private Browsing. Click that to disable caching.
Here is how I have done it for flex/flash and silverlight and it works.
Code Behind ASPX or CSHTML
string slUrl = "/ClientBin/MySilverlight.xap";
string filePath = Server.MapPath(slUrl);
FileInfo info = new FileInfo(filePath);
// this will force browser to
// re download file if file was
// updated
slUrl += "?t=" + info.FileWriteTime.Ticks;
ASPX or CSHTML
<embed ....
src="<%= slUrl %>"
..
/>
Trick is you have to change url by adding something after ? and make a new arbitrary random query string or use file write time, and for browser, something?t=1 and something?t=2 are two urls and it will not pickup cache if t changes.
Instead of write time, you can also choose any standard config value or you can even simply hardcode your ASPX or HTML and append something after ? that will force browsers to download silverlight xap file again.
<embed ....
src="/ClientBin/MySilverlight.xap?something-different-each-time"
...
/>

Resources