Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Big changes are coming in D8 caching, and Symfony has its own http cache as well! Been wondering how this will affect Boost.
http://symfony.com/doc/current/book/http_cache.html
#1597696: Consider whether HttpCache offers any significant benefit over the existing page cache
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedReading it over and I think the caching layer operates in PHP; thus there is room for improvement. There might be 3rd party Symfony code that is similar to Boost. Researching this point is the first step.
I did something similar for the replacement of drupal_http_request()
https://groups.drupal.org/node/233173
I had httprl but guzzle was already out so we went with guzzle.
Comment #2
giorgio79 CreditAttribution: giorgio79 commentedHey Mikey,
Researched some more and found doctrine/commons which seems to be another great solution. More info here http://nerdpress.org/2012/07/10/caching-data-in-symfony2/
Comment #3
frobI think Boost could be completely awesome in Drupal 8. Specifically due to the services nature of Drupal 8. This is all theory to test the waters for the interest in developing this out further.
Boost could work as it does currently, (simplified) by generating static html that gets served instead of bootstrapping Drupal. Then atop that we could have a js script that would auto update the site with backbone.js accessing the data through the new Drupal services. This would allow static caching for logged in users.
Now is the time to start implementing this because this is awesome and patches that are awesome enough can still get in. Not saying that we should try and get boost into core, but instead saying that we might be able to simplify the installation process by building this out now.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedOnly mikeytown2 and bgm have write access to the repository for boost (AKAIK), I just provide support for the forum.
Comment #5
shivanshuag CreditAttribution: shivanshuag commentedI am interested to port the module to d8 as a part of Google Summer of Code. If you already plan to port the module to d8, I can still help
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedFeel free, no one was assigned and the last time I checked the documentation for the caching side of Symfony in D8 was so undefined that I couldn't work out how it was being implemented or whether boost had been negated. The major problems that you will face are caching pages with form data on them which would lead to data leakage.
Comment #7
shivanshuag CreditAttribution: shivanshuag commented@Philip_Clarke Hi, I wanted to ask if you are willing to mentor the porting of this module under GSoC.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedI think that https://www.drupal.org/user/282446 mikeytown2 , https://www.drupal.org/user/89461, bgm would be more appropriate. In that order for the most recent changes to the code base.
Comment #9
jackbravo CreditAttribution: jackbravo commentedNow that we have a release date for Drupal 8 this is even more important.
Is anyone working on this? I would like to help =).
Comment #10
ksevta CreditAttribution: ksevta commenteddrupal 8 still needs boost or dynamic_page_cache module in core is better than boost....
Comment #11
jackbravo CreditAttribution: jackbravo commentedBoost is always better than any Drupal cache, because the web server sends the page without needing to use PHP to get the page from the cache.
Comment #12
mark_fullmerI agree that, for people who can't use a memory-based caching solution (e.g., Varnish), a Boost-type approach will be a significant improvement over Drupal caching.
I have a working proof-of-concept for Boost-type caching for JSON rest data generated by Drupal 8 at https://www.drupal.org/sandbox/markfullmer/2655858. While I don't plan to expand this module to cover traditional pages, since I'm only using D8 as a backend, the implementation would be very similar; happy to discuss!
Comment #13
swim CreditAttribution: swim commentedWell here's an initial start on this, https://github.com/swim/boost
As others have mentioned this caching mechanism is really only useful when combined with appropriate web server configuration. Currently only a very basic nginx config has been provided and could be improved greatly, need to check for user session etc. Regardless of the current shortcomings I'm using this on varied hosting scenarios and it's rather effective - I'll share some WRK (HTTP benchmarking) results.
Comment #14
jithesh_drupal CreditAttribution: jithesh_drupal commentedComment #15
hkirsman CreditAttribution: hkirsman commentedUp!!! Love the work you're already done, swim!
Comment #16
swim CreditAttribution: swim commentedThanks @hkirsman =),
I'll address your PR regarding server conf's ASAP. Going to provide an Apache one this weekend as well. Don't have any production servers with Apache tho; would be great if people could test. Theres some WRK brenchmarks in the readme.md,
595713 requests in 30.10s, 6.84GB read
Requests/sec: 19791.44
Transfer/sec: 232.74MB
Skipping PHP has it's gains xD.
Comment #17
hkirsman CreditAttribution: hkirsman commentedI'd love to see the apache conf now :D Working on a project.
Comment #18
hkirsman CreditAttribution: hkirsman commentedAny update on this? Still needing the apache conf! :)
Comment #19
DamienMcKennaStandardized the title.
Comment #20
ajayg CreditAttribution: ajayg as a volunteer commentedAny update on this?
Comment #21
pipicom CreditAttribution: pipicom commented+1 Any update on this?
Comment #22
ANDiTKO CreditAttribution: ANDiTKO as a volunteer commented+ 1 for this. Boost is still effective for Drupal 8. Specially if you have a more static site or a shared hosting where nginx and varnish are not an option.
Comment #23
C-LogemannI tested the code of #13 (Git repo of @swim) and this is a good start for the D8 cache integration. I will invest some time to improve and help to get this stable. But currently there is no server configuration helpers integrated as in D7.
Some thoughts and ideas about configuration helper:
When I look in D7 issues I see most problems with the configuration helper and not with the core functionality. It seems that many problems are related to different apache versions and in the D7 version there is no helper for nginx at all.
Because of the increasing complexity of different Apache versions and other webserver technologies I think it's not good to keep this helper functionality inside the main module. Maybe this can be handled inside an additional module. But I think it would also be possible to create an online helper for rewrite rules like the Mozilla SSL config generator. With this strategy we can keep the code lean, the port to D8 very fast, and the configuration helper side more flexible.
Comment #24
giorgio79 CreditAttribution: giorgio79 commentedProposed Boost for D8 core #2957610: Static HTML file caching in Drupal Core - Boost
Boost saved thousands of Drupal users hundreds of dollars in hosting costs.
And frankly, no one should expose Drupal (php/mysql) to the torrent of anonymous traffic on the net when they can serve up simple HTML.
Comment #25
C-LogemannI just posted #2995040: Applying to be Maintainer and add this as related Issue.
@giorgio79 Because of so much arguments against Boost module with Varnish and other caching technologies and missing support for this module as contrib I believe it would be very hard to get this in core. Personally I currently don't see a reason to get this in core especially because of the new possibilities of Symfony. But in any case we need to get this run on Drupal 8 as a contrib module. Then we maybe get a chance for core like it was with views, media and so on.
Comment #26
swim CreditAttribution: swim commentedI'll provide an update on what I have done. The original work was completed in early 2016 and a lot has changed (3 years almost). Additionally, it was really a basic POC which was going to use stack middleware to handle the caching logic. However, alternative mechanism such as memcache and redis can retrieve cache entries faster than the file system can.
The only way this is worthwhile is to have the web server handle/ serve the cached response. Additionally, allowing dynamic data can be achieved via a reverse proxy making for an inexpensive D8 site.
I have totally rewritten my original implementation; which now uses a custom Guzzle client with Kevinrob\GuzzleCache and my own implementation of Cache\Adapter\Filesystem\FilesystemCachePool which is of course PSR6 compliant and plays nicely with Kevinrob\GuzzleCache\Storage\Psr6CacheStorage. The difference being with how we handle cache keys. Cache keys need to be reproducible by the web server. Cache keys derived from a filesystem path can potentially leverage a hierarchical strategy E.G. sites/default/files/cache/node/3 > |cache|node|:nid
Comment #27
hkirsman CreditAttribution: hkirsman commentedI was curious to know if in D8 Boost would be able to detect what pages to update when for example node is being saved which is also shown on front page and news listing page?
Comment #28
swim CreditAttribution: swim commentedIt certainly would; but that's simply piggybacking of cores cache tags.
Comment #29
effortDee CreditAttribution: effortDee commentedAny more updates?
Comment #30
pipicom CreditAttribution: pipicom commented+1 This module is highly anticipated.
Comment #31
C-LogemannI just was added as maintainer and will soon start my work on a D8 version in a lean concept as described in #23.
Comment #32
C-LogemannComment #33
joseph.olstad@C_logemann , any progress on this?
Do you have a working apache config for the swim version of boost https://github.com/swim/boost?
Comment #35
C-Logemann@swim I decided to start with your initial port from #13. But I'm also interested in your additional work you mentioned in #26.
Because the initial port is already done I close this issue. We should open separate issues for improvements, bugs and feature requests of the D8 version.
Comment #36
joseph.olstadThanks C_Logemann, the boost module for D7 is great, good to see some movement for 8.x as well, can you please add a 8.x-1.x dev build on the project page?
also, could maybe tag an alpha release
Comment #37
C-Logemann@joseph.olstad This was just the fist step to start with the code from swim. But after some tests functionally and technically I will do some corrections when needed regarding actual core and upcoming D9. The next step will be promoting the dev release on project page. And next we create a plan what is needed for alpha, beta releases.
Comment #38
joseph.olstadThanks!
Comment #39
C-LogemannFor people without git skills: The code can be downloaded via dev release page
Comment #40
joseph.olstad@C_Logemann, if you have sufficient maintainer priviledges you can add a dev release to the project page , click this link:
https://www.drupal.org/node/89309/edit/releases
add a release for 8.x-1.x
after the project page cache expires it should show up on the project page.
?
Comment #41
C-Logemann@joseph.olstad I know that and decided to wait with this until additional tests.
Comment #42
DamienMcKennaIt'd still be worth adding a dev snapshot as then you could enable automated tests. This would at least help make sure patches people upload can apply cleanly to the codebase, even though there aren't any actual tests yet.
Comment #43
C-LogemannOK, I added dev release to project page and added tests.
@DamienMcKenna Thanks for the information about testing framework.
Comment #45
nonom CreditAttribution: nonom as a volunteer commentedThe Apache configuration is probably not needed at all.
Comment #46
jsibley CreditAttribution: jsibley commentedHi. Is this still moving forward for D8? Thanks.
Comment #47
aiphesHello
is there any news about the D8 version ?
Thanks
Comment #48
pipicom CreditAttribution: pipicom commentedHello people!
Awaiting for the stable D8 version 🧐
Comment #49
localnetwork CreditAttribution: localnetwork commentedLooking forward for a stable version.
Comment #50
joseph.olstad@C_Logemann, any chance for an alpha tagged release?
Has anyone had any success with the dev version of boost (8.x-1.x)?
has anyone forked this project with any success?
Comment #51
C-Logemann@joseph.olstad
In meaning of just tagging the current code:
No. Because we currently only have some code which the original author of the port even like anymore.
In meaning of pushing this module to something I like to tag as ready code for usage:
I think there is a good chance to move on this year from my side and time I can contribute. But unless we don't get more support of other contributors I will focus only a light version of this module without any server configuration help (.htaccess snipit generator). Because my company currently focus on Nginx it will even not easy for me to help with testing of Apache (.htaccess) and cannot give any support on this.
This question is the best argument against just tagging the code.
From the current state of contributions for this module I would even welcome forks of this project if this is the only way to get contributions I can backport.
Comment #52
joseph.olstadI don't see why we can't support .htaccess, as it's already working nicely in boost 7.x (especially when using the best RTBC patches with 7.x)
can't we just upgrade those forms and code?
have you tried drupalmoduleupgrader ?
it's got some newer releases lately, might be worthwhile taking the latest dev of boost 7.x (with the best rtbc patches applied) and making another 8.x branch from that using drupalmoduleupgrader at least to get a head start.
otherwise we'll end up with forked versions of boost 8.x , one for nginx and another for apache.
In fact, there's also quite a few RTBC patches that should be brought into 7.x before running drupalmoduleupgrader
no sense upgrading bugs into 8.x
I'd rather see the best RTBC patches going into current head of 7.x THEN run drupalmoduleupgrader
Maybe you should add me as maintainer so that I can work on this.
Comment #53
joseph.olstadso my approach would be:
take 7.x boost, latest dev, add the most reputable rtbc patches to it
then run drupalmoduleupgrader on that and doctor that up, test it.
this will get most of the best possible code to start with in Drupal 8.
seeing as the current 8.x branch is stale, likely has a lot of unnecessary bugs and perhaps stripped down functionality, make a new branch
Comment #54
liberatrFor anyone who ends up at this issue wondering about a static solution for D8/9/10: https://www.drupal.org/project/tome
I realize it is a pretty different use-case to Boost, but anyone looking at this problem space in the modern era is probably also wondering about static site generators.
Comment #55
joseph.olstadya I noticed that one, pretty cool, however boost imho, is still a pretty awesome solution that is missing from D9/D10.
Boost in D7 is very cool, would be nice. I spoke with MikeyTown2 a while ago, he was the main mastermind behind Boost, this project is seeking
new maintainers btw.
Comment #56
C-LogemannWe are moving forward to a stable boost D9 module with core functionality as I just added code from #3214814: Drupal 8/9 readiness, pages configuration, purge and generate caches.
If somebody wants to contribute code with an Apache config helper e.g. based on old D7 code and maybe created with the "drupalmoduleupgrader" module I'm open to accept patches or better Merge Requests if this is placed in a sub module. But as described above I will concentrate on core functionality which based on the code provided by @swim and extended by @abhaisasidharan and myself with some configuration options.
And everybody who like Apache configuration options can primary start to help with all the Apache related issues in this module which are not related to core functionality or only related to configuration helper.
Comment #57
ressa CreditAttribution: ressa at Ardea commentedSounds great @C-Logemann, thanks.
@liberatr I agree that Tome is relevant to mention here. I just tried Bookish, which is an install profiles show casing Tome, and I was extremely impressed. Bookish is quite easy to get started with, and experience how Tome works: