Jump to content

Weekly update – 17 July 2020


ryan
 Share

Recommended Posts

Greetings from the sunny covid hotspot state of Georgia, where we haven’t left the house since March. And now getting ready for the kids to start a new school year from home with virtual learning. Everyone delivers everything now, so there’s no need to go out to a grocery store anymore (or go anywhere). I live about a mile from the CDC, so our school district has more kids with parents working at the CDC than any other. That gives me some comfort, knowing that I won’t be sending my kids back to school until the experts at the CDC are willing to; when it’s really and truly safe. Though I don’t think it’s going to be safe for a long, long time. The US is a rudderless ship right now, so we just have to ride it out. Thankfully, we’re all staying safe and keeping busy. The kids are building houses in Roblox (an online game addiction they have), we’ve converted our yard to be a summer camp, and converted the basement to be a gym, while we clear more space to start building out a massive N-scale train set—my 3 locomotives still work perfectly, even after 35 years of storage. And I’ve been learning how to manage chlorine and PH in an inflatable kids pool that keeps the family cool in the hot weather. The kids miss school and other activities, my wife misses being at her office and people she works with, and we all miss our friends and family, but it’s the way things are now, and I’m just grateful to have my immediate family home and safe; and in place where we can ride out the storm. I’m also really glad that I can work on the ProcessWire core and modules for pretty much the entire work day, and enjoying coding as much as I ever have; feeling great about where ProcessWire is and where it’s going, thanks to all of you. 

I’ve been working on the latest ProCache version the entire week, so not many core updates to report today other than some new hooks added to the Pages class (they are hooks that the new ProCache can use as well). I’d hoped to have this version of ProCache finished by now, but I keep finding more stuff to improve, so decided give it another 2 days of work and testing, and if all looks good, it’ll be ready to release, which will be next week. This version is essentially a major refactor, where just about every line of code has been revisited in some form or another. But if you are already a ProCache user, you’ll also find it very familiar. While I don’t have it posted for download today, below is a brief look at what’s new. 

  • Completely new .htaccess rules (v2) that take up a lot less space, especially when using multiple hosts, schemes or extensions. 
  • Ability to choose .htaccess version (v1 or v2).
  • ProCache now creates an example .htaccess-procache file that you can rename and use or copy/paste from. 
  • ProCache now has a built-in URL testing tool where you can compare the non-cached vs. cached render times. 
  • New setting to specify how ProCache delivered URLs should respond to trailing vs. non-trailing slashes in URL. 
  • Significant refactor that separates all ProCache functions into separate dedicated classes. 
  • Improved custom lifespan settings with predefined template lines.
  • Improved behavior settings with predefined template lines and simpler letter (rather than number) based definitions. 
  • Ability to specify predefined cache clearing behaviors, specific pages to clear, or page matching selectors, from within the ProCache admin tool. 
  • New predefined cache clearing behavior: Reset cache for family of saved page (parents, siblings, children, grandchildren, and all within). 
  • New predefined cache clearing behavior: Reset cache for pages that reference saved page (via Page references). 
  • New versions of SCSS and LESS compilers. 
  • ProCache is completely ProcessWire 3.x native now (previous versions still supported PW 2.x even if 3.x was recommended).
  • Numerous other improvements, fixes and optimizations throughout. 

I’ve previously mentioned a built-in crawler in ProCache. That part has been moved to a separate module called ProCacheCrawler and will be released a little later in the ProCache board. It was taking a little too much time to develop, so I didn’t want to hold up the rest of ProCache while I developed that. When installed, ProCache communicates with the crawler, identifying and adding URLs to a queue to be crawled and primed for the cache. What it does is pretty cool already, but it needs more time to develop. It’s also something that depends on being run regularly at intervals (like with CRON) so it’s a little bit of a different setup process than the rest of ProCache, which is another reason why I thought I’d develop is as a separate module. I’ll be working more on finishing development of the crawler later in the year, after the next master version of ProcessWire core is released. Next week I'll have the new ProCache version ready for download as well as a new core version on the development branch. It will focus mostly on fixes for issue reports as we continue working towards the next master version. Thanks for reading and have a great weekend! 
 

  • Like 36
Link to comment
Share on other sites

@ryan Thanks for updates. In previous versions of ProCache there is no way to clear cache separately for page and its urlSegments. As all templates loads on every request, I'm trying to keep the number of templates as low as possible, so very often we use urlSegments for that. In such cases, the output of the page and its urlSegments could be not related to each other. 
It would be great if we could control this behaviour via cache clearing behaviors options or at least have separate functions from API side.  

Link to comment
Share on other sites

4 hours ago, Davis Harrison Dion said:

Hello Ryan - Does ProCache work with Nginx, or can it be made to work with it?

We are using ProCache with nginx on multiple sites. Out of the box it generates rules for .htaccess but those obviously can be translated for nginx. there are also configuration examples in ProCache support (accessible once you bought ProCache)

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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