Hot answers tagged

4

I have run into this issue before and I was in the same boat. And "Static Page Caching" didn't do it for me, CE Cache did. I learned that I had to make sure I was really caching the site correctly, such as the right areas and embeds. Also I made sure that I wrote my markup in the best way I could to reduce queries. I hope this helps, I have always found ...


4

{exp:stash:static} caches the entire page to a static file. The cached output is not stored in the database. And you can't cache just a region / section of the page. When it works for you to use {exp:stash:static}, it should return pages noticeably faster than {exp:stash:cache}, and also (since the page requests route directly to the static file, without ...


4

The session cache only lasts for a single page request. So by the time your action gets called, that cache is gone. You'd be better off adding those to the form as hidden fields, and then grabbing them from POST in your action.


4

ref: https://docs.expressionengine.com/latest/development/legacy/libraries/cache.html#class-methods ee()->cache->delete('/myaddon/');


3

Sorry for the trouble. This is an issue in EE 2.9 and will be fixed in the next release. For now, you can get around it by specifying the cache driver in your config.php: $config['cache_driver'] = 'memcached';


3

After speaking with Derek privately I was able to resolve the issue which is a permissions error. The steps taken to solve this are: Via FTP/SSH navigate to system/expressionengine/cache and delete everything with the exception of .htaccess and index.html . Afterwards, change your permissions on system/expressionengine/cache to be 777 then restart your ...


3

/system/codeigniter/system/libraries/Cache/Cache.php Has the Cache class - Check this file is on the staging server, also check the permissions. I've often had similar issues where it's related to case sensitivity and differing servers (my local not being case sensitive, the public servers are) - so also check that the folder and file are in the correct ...


3

If you use that code in an EE template (rather than a Stash embed) then EE will parse {segment_1} early, before tags are run and before Stash can escape it. See step 1 here: http://loweblog.com/downloads/ee-parse-order.pdf The good news is you can access any global variable or snippet as a tag like this: {exp:stash:get name="segment_1" type="snippet"} ...


2

I'm afraid I cannot reproduce this problem. Logged in/out, cookies enabled or disabled, I find that the cached items are generated only once until they expire. Tested with both EE 2.6.1 and EE 2.7.2 and Stash 2.4.6. To rule out a server vs php timezone configuration issue (where the expiry date may fall in the the past of the server) please try with refresh=...


2

If your code above is in a Stash file (i.e., not a regular EE template), double-check to make sure that you have this Stash config set: $config['stash_file_sync'] = TRUE; I've had this happen to me a few times: I make a change in a Stash file, forget that I have that setting set to FALSE, and wonder why my code isn't working as expected.


2

CE Cache and ExpressionEngine's cache="yes" are not true caches. I hate that they advertise themselves as "caches" - they are not! They simply cache ExpressionEngine template parsing's output at a very high level, the entire PHP stack and ExpressionEngine core still needs to run. Not to mention database traffic, even for non-logged in members due to EE's ...


2

It might be a parse order issue. If so, using Stash should work to save the categories into a variable list, and then you can run the ce_cache:clear when outputting the list (this is untested): {!-- cache a list of the category url titles --} {exp:stash:set_list name="cached_cat_url_title" parse_tags="yes" trim="yes" } {categories} ...


2

{exp:stash:cache} creates a cached variable with the URI as the context. That means each URI at which the host template is viewed will generate a unique instance of the variable. This tag is therefore generally used for full page caching, or for URI-specific fragments of template code. You should use {exp:stash:set} with the site scope to create a single ...


2

For me it was my .gitignore file was set to ignore all 'cache/' folders which must be case sensitive. Changing to explicit paths fixed the issue once I redeployed.


2

EE Control Panel is never being cached by ExpressionEngine itself. The chances are: It is cached server-side by third-party server tools (you might want to talk to your hoster about that) It is cached by your ISP, if you use proxy server It is your browser's cache As one possible way around, try changing Control Panel Session Type in preferences to ...


2

the processing time is the "0.9711s" on this image. But you can add this values to your template, if you want to. The {elapsed_time}, the {total_queries}, etc are all available as standard global variables. For example, I usually add something like this to the footer of every page: {if logged_in_group_id == 1 OR site_url == "http://dev.domain.com"} &...


2

Static caching A static cached page is just plain old HTML, it doesn't pass through EE or PHP at all. You cannot therefore escape regions of the page from caching: https://github.com/croxton/Stash/wiki/%7Bexp%3Astash%3Astatic%7D Freeform forms cannot be cached as they require a token to be generated for each user that views the form, and that is only ...


2

You can set the template refresh to a really high number (e.g. 14400 minutes which is 10 days), or you can change to using a static cache - for example the one that is built in to the stash add-on. The possible advantage of keeping the EE4 cache with very high numbers is that it works, that it is easy to implement, and that you get (fairly crude) cache-...


2

You could allow the authors member group access to System utilities, you can restrict it so they only have access to "Data operations" which has the clear cache facility. Also add a custom menu link directly to that page for quick access. If you wanted to do it manually delete all the content inside /system/use/cache/default_site


1

So I dug into it, and here's what I've come up with. I've tested it extensive on my setup (Laravel Forge), but of course YMMV. The methodology is a little different than the Apache version. Since we have to check for the existence of the cache file anyway (and we know there won't be a cache file for anything that isn't supposed to be cached), there's no ...


1

CE-Cache. Use it. It's static file cache creates flat generated cache files that serve instantly on a site that gets 500k hits a week, over a million requests during the semester. You can use the cache breaking feature to break cache when you update channel entries, relationship, basically anything. I can't speak for the alternative caching methods it ...


1

We never recommend caching a form because it has a unique identifier from ExpressionEngine for CSRF protection that's generated per page as well as a unique identifier from Freeform used to prevent spamming, malicious form manipulation, and to assist in multipage forms. You are getting the invalid form ID error because the cached form isn't able to ...


1

After some research and digging into the actual Cache_redis.php file, I've found that there is currently not a way to specify a DB index without modifying the ExpressionEngine Core. The only way to handle multiple dev/staging servers would be to utilize a something like the Focus Labs Master Config and configure separate Redis servers for each install.


1

I am also seeing this issue on EE 2.9.2 as of May 5, 2015. I turned off Channel Caching (Admin > Channel Administration > Global Preferences > Cache Dynamic Channel Queries?) and it seems to have fixed the problem. If you want to keep caching globally but remove it in a few cases like this one, you can add cache="no" as a parameter to the exp:channel:...


1

I can't replicate this locally, so I'm not sure it's a bug. Is that all the code you're actually using to test this? Because if you don't include {paginate} tags, then {absolute_results} will always be the same (or less than) your limit parameter. (The existence of {paginate} tags is what actually triggers pagination.) Add a {paginate} loop and see if this ...


1

It is used by the CodeIgniter database drivers. $db['expressionengine']['cache_on'] is exactly what it is related to. The $db['expressionengine'] settings are passed to CodeIgniter and read based on the active record group set $active_group = 'expressionengine';. CodeIgniter 2.x Database Configuration


1

As far as I can tell it's not actually used for anything. Tried searching the source for 'cachedir' and I see it is set numerous places but never used. In DB_Driver.php there is this function, which is never actually called from anywhere: /** * Set Cache Directory Path * * @access public * @param string the path to the cache directory * @return ...


1

As I mentioned on Twitter you should not need the Solpace tags to render your search form, according to the docs. The fact that your form does not work without them might point to another issue which you should explore with Solspace. Nevertheless, if you want to investigate the cache escaping, please make sure you are using the latest version of Stash and ...


1

Have a look at the caching options available with stash. See Mustash for cache breaking rules. The most basic option here would be to cache the lists when creating them with append list. You might also consider using set_list tags instead of append_list where possible as they will be more efficient (that's my understanding at least)


1

I think it's to do with the {DATE_ATOM} variable including the seconds which I think gets updated when editing an entry thereby triggering it to be displayed again. If you use {gmt_date format="%Y-%m-%dT%H:%i%Q"} (which I use in my RSS templates) or possibly {entry_date format="%Y-%m-%dT%H:%i%Q"} if gmt_date isn't available for ATOM instead I think you ...


Only top voted, non community-wiki answers of a minimum length are eligible