Closed (fixed)
Project:
CDN
Version:
8.x-3.x-dev
Component:
Origin Pull mode
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
18 Apr 2016 at 21:56 UTC
Updated:
29 Sep 2016 at 12:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersI discussed this with @Fabianx. And while doing so, I realized that much (most!) of the typical cost that comes with Far Future expiration is in fact a non-issue in Drupal 8 thanks to Dynamic Page Cache.
Fabianx said he'd keep this functionality if he were the maintainer.
So, it's decided, I will port this.
Comment #3
wim leersI've been working on this quite a bit in the past two weeks. But even though I've simplified the Far Future expiration functionality a lot (I've removed the auto-generating of files), and even though Symfony now handles some significant portions (serving of files including
Accept-Ranges: bytessupport), it's still very complex. The main reason: everything is configurable. Which means all of the settings have to be parsed, interpreted, and routed to the right code, which then is best implemented as plugins, et cetera.But for who am I doing this? I think the vast, vast majority of users never even changed their Far Future expiration configuration. The complexity of this functionality (and the improved way I was implementing it) is causing the oh-so-simple CDN module for D8 to have at least a doubling in terms of complexity. Which causes me great concern. I want this module to be simple to use, but also simple to debug and maintain. I don't think this extra complexity is worth it.
So, I'm posting the local commits I've made so far, and I'm going to revert the last commit and parts of earlier commits. It's only that started to address the configurability aspect. I'm going to remove the detailed configurability of Far Future expiration. And instead, I'm just going to make it always use
mtime, for all files. That's good enough, and it vastly, vastly simplifies things.Comment #4
wim leersFrom
28 files changed, 558 insertions(+), 661 deletions(-), and not even be remotely completed…… to
20 files changed, 284 insertions(+), 850 deletions(-)So much simpler!
(Rather than reverting a commit, I just added a new commit.)
Comment #5
wim leersClean-up + test coverage.
Let's see if this passes tests.
Comment #8
wim leersClean-up, both in terms of consistent naming (always
farfuture) of methods, as well as file names. Most importantly: this adds an integration test for the farfuture functionality.Comment #11
wim leersFix nitpicks, and re-enable the uninstallation test coverage.
I've been unable to pinpoint the root cause of that one last failure. I've confirmed that reverting this patch causes tests to pass again. So this is somehow causing the fail, I just don't understand how yet. Fixing that won't be for today, it's getting very late here.
So close!
Comment #14
wim leersFound it. Was a silly small thing. Had to be.
Comment #15
wim leersFinishing touches.
Comment #16
wim leersI declare this ready now :)
Comment #18
wim leers24 files changed, 451 insertions(+), 1065 deletions(-)Glorious simplification :) In part because Symfony provides some of the things that the CDN module used to do. And in part because it now will not attempt to generate files that don't exist yet (which was the cause of MANY bug reports in D7), nor is it configurable: it simply uses
mtimefor all files, rather than configurable-per-directory "unique file identifiers". The omission of the most brittle functionality and configurability allows for a sharp decrease in complexity.Comment #19
wim leersBy the way, this is what its configuration UI looks like, including its tour tip.