I advise you take a look at Upper for Craft 3 by the wonderful Oliver Stark.
Make Craft fly. Well, stick a reverse proxy in front of it then auto-magically invalidate the right caches.
To install Falcon, follow these steps:
falcon
directory into your craft/plugins
directorygit clone https://github.com/joshangell/falcon.git
directly into your craft/plugins
folder. You can then update it with git pull
composer require joshangell/falcon
falcon
for Craft to see it. GitHub recently started appending -master
(the branch name) to the name of the folder for zip file downloads.craft/app/etc/templating/BaseTemplate.php
, inserting it after if ($cacheService) { ... }
in the _includeElementInTemplateCaches
method: $falcon = craft()->getComponent('falcon_templates', false);
if ($falcon) {
$falcon->includeElement($elementId);
}
Yes that was a core hack, which is always necessary on Craft 2.
Falcon works on Craft 2.4.x and Craft 2.5.x.
Currently very un-configurable.
The Varnish URL is set to http://0.0.0.0:8080/
, the headers used are xkey
specific, silly things are happening like Matrix blocks are getting their IDs sent out, there are no Tasks and custom keys aren’t purged.
But hey, this is basically still classed as an experiment.
You need to do this in your layout:
{% falcon %}
<!DOCTYPE html>
<html>
<head>...</head>
<body>
...
</body>
</html>
{% endfalcon %}
Then elsewhere:
{% extends "_layout" %}
{% falcon_addkey 'section:news' %}
{% block content %}
...
{% endblock %}
-Insert text here-
These things need to happen before it can be considered ready for use:
section:handle
purge requests or whatever we do when doing the extra tagging during render.Brought to you by Josh Angell