How to make view cache unlimited in cakephp 4.x - caching

I'm trying to enable caching for my site
enable cahe in bootstrap file but /tmp/views is always empty
thank you

There is no view caching anymore in CakePHP, it has been dropped ever since CakePHP 3.
You can use for example a caching proxy like Varnish, or a CakePHP plugin like dereuromark/cakephp-cache, or implement your own caching solution. If you only need to partially cache views, look into caching elements.
See also
Cookbook > Appendices > 3.0 Migration Guide > CacheHelper Removed
Awesome CakePHP > Caching

Related

Joomla content cahcing issue

I have a strange issue with Joomla content caching, the articles themselves take up to 10 mins to refresh their titles, images, text.
i have disabled System - Page Cache
Note i am also using cloud flare
Thank You.
If I'm not mistaken, cloud flare has some serious problems with caching. Check with them and they may send you some lines that you have to throw in your .htaccess to disable their caching.
If you have specifically enabled page rules in CloudFlare to cache static content, then it's possible this is CloudFlare related, It's easy enough to check by deleting any page rules which could cause this.
I have dozens of Joomla sites using CloudFlare and I've never seen that there was a problem combining them, or that ClouldFlare would try and cache articles by default.
As you will know, by default CloudFlare will cache static content like javascript and CSS files, but from what you describe, it's seems unlikely that this could be a cause.
I know you mention that articles are being cached, but if you have double checked that
- Extensions > Plugins > System - Page Cache is disabled
- You have cleared System > Page Cache
- You don't have any other caching enabled on your site
- You haven't specified custom ExpiresByType or mod_headers settings in .htaccess
then try setting System > Global Configuration > System > Cache to Off and on the same window if you have selected memcache(d) for the cache handling, change it to File.
These last settings under System > Cache should only affect module caching, not article caching but it doesn't hurt to rule it out.
Good luck!

Kentico Output Caching issue - content couldn't get updated

I am working with a Kentico site and I have a problem with page output caching.
We have a custom webpart which loads the records from a Bizform's record data and displays those data in a page. The problem is that after giving it several tries, we couldn't figure out the problem why the webpart couldn't get the latest data from the bizfrom data and we suspect it was because of output caching.
We tried to:
Disable webpart output caching in webpart configuration
Disable page output caching in CMSDesk > General > Output Caching
Disable site output caching in Settings > System > Performance
Disable IIS cache for both User-mode and Kernel cache
Create cache dependencies for cms.form|byid| touched key (which I found is not supported in current kentico version)
And going to try create event handler to add touched key on bizform insert event
We encounter a similar problem with Shopping Cart Mini Preview Webpart with Ecommerce.CurrentContext.CurrentShoppingCart which returns different result for service handler (.ashx - gets updated) and for webpart (.ascx - does not get updated)
If you ever experienced these problems, please help.
The last place where it could be cached is the content cache. It can be set either in Settings->System->Performance or at the web part level under System settings section.
Only web parts that utilize the content caching have this section available. (E.g. some repeaters and data source web parts.) It might be a little bit confusing because then there are two sections (System settings and Performance) where you can influence caching. However the Performance section is used to set up the Partial output cache.
Anyway, you should definitely try to check Cache debug to see what is actually cached.
Additional resources:
Deep dive – Kentico CMS Caching
New in 5.5: Caching API changes
Deep dive: Cache dependencies
Kentico caching and cache dependencies explained
ASP.NET Caching Dependencies
I have faced issue similar to second one (with Shopping Cart Mini Preview Webpart) recently. Only web service (.asmx) was used instead of HTTP handler. In my case issue was solved by setting the EnableSession property of WebMethod attribute to true for all the CRUD webservice methods.
[System.Web.Services.WebMethod(EnableSession = true)]
So I think the matter is that handler should be able to access current Session.
In case of HTTP handler you could try to add IRequiresSessionState on the handler declaration to attach it with the session.
I am also using Kentico 8, I see that your Kentico version is older. That might also have impact but I am not sure about that.

Which data in cached in yii after enable Yii

I checking out the Schema Cache part of Yii. Then I found the way for enabled via CFileCache and schemaCachingDuration. It is done without any problems. Now I am thinking as I did not specified which components should be cached. So Which part of application, Yii cached after enabled caching (In the way when we did not set any of other cache settings ). It just schema or more ?
By default Yii only caches:
Global state
Translated messages
WSDL files of Web Services
All other cache features (schema caching, data caching, fragment caching, page caching) are only used on demand (i.e. if explicitely enable/use them).

How to cache module in CI with HMVC

CI (2.1.3) & HMVC (5.4)
I have tag cloud (/application/modules/tags)
This module displayed in the template as a block — Modules::run('tags')
If I use $this->output->cache(60) in controller, it cache all page (not tag cloud view).
How can I use blocks caching?
There is no way to do it with Codeigniters built in caching, it only allows you to cache full pages. You need to go and get yourself phil sturgeons partial caching library. https://github.com/philsturgeon/codeigniter-cache, this will let you cache whatever you want.
The only downside is that if your not careful, it can be a bit of a pain to maintain as the site grows, so think carefully about when you are going to need to clear various caches.

MVC3 Partial with no caching on page with caching

In my MVC3 Project I use some output caching with the OutputCache attribute set on the action. However there are certain sections on this page that I dont want to cache ever.
Is it possible to have some partials in my view that overrides the pages caching?
You can now get proper donut caching by downloading the MvcDonutCaching NuGet package. See http://mvcdonutcaching.codeplex.com/ and http://www.devtrends.co.uk/blog/donut-output-caching-in-asp.net-mvc-3 for more information.
Yes you are 'supposed' to be able to do this.
See:
Partial Views Caching in ASP.NET MVC 3
Also I use a method to disable caching for controllers here:
Disable browser cache for entire ASP.NET website
Seems like this is the answer: http://weblogs.asp.net/scottgu/archive/2006/11/28/tip-trick-implement-donut-caching-with-the-asp-net-2-0-output-cache-substitution-feature.aspx
You basically have two options:
Refactor the page so that rather than caching the entire page,
you identify all the specific pieces (controls, partials, etc) that
should be cached. (boo)
Use output substitution blocks as Scott
Guthrie describes in the link. (boo as well unless the replacement
is just simple text)
This is called donut caching and isn't supported out of the box in MVC3. Check out my similar question here. Specifically, Jan Jongboom's Moth library which he suggests can do this (though I cannot confirm or deny this)

Resources