Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Aoe_Static with AOEmedia repo #11

Open
wants to merge 151 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
0e0bbeb
Added Cache-Control: no-cache for non cacheable sites
Jul 27, 2012
bd9b295
Changed configuration to read xml files aoe_static.xml
Jul 27, 2012
5b1a93c
Fixed typo and removed aoestatic header with value cache in non cache…
Jul 30, 2012
b051716
Fix to show Headers too if config cache is enabled
Aug 15, 2012
1427d50
Fix cache ID conflict with Full Page Cache,
tmotyl Sep 24, 2012
710befa
Raise version number
tmotyl Sep 24, 2012
1ee2d6f
Added new marker
fbrnc Oct 23, 2012
b548a63
Removing CUSTOMERNAME and CARTSUMMARYCOUNT from before_body_end block
fbrnc Oct 25, 2012
4ac4fd1
Fixed missing marker characters
fbrnc Oct 25, 2012
b692327
Added some comments
fbrnc Oct 25, 2012
81df9cb
Make cookies available for js when "use httpOnly"
tmotyl Nov 6, 2012
607178e
Fix XSS issue with customer name
tmotyl Jan 16, 2013
d741551
MAGE-239: Varnish doesn't purge the GuidaTv page
Apr 3, 2013
802d613
MAGE-239: Varnish doesn't purge the GuidaTv page
Apr 4, 2013
b070dd9
MAGE-239: Varnish doesn't purge the GuidaTv page
Apr 9, 2013
5cb64b7
used request string without params as identifier
Mar 30, 2013
18da5cd
Add possibility to register own markers for cookies and headers
tmotyl Jun 14, 2013
0ceab3c
[!!!] add cookies and headers in the postprocess event instead of pre…
tmotyl Jun 17, 2013
cdf72d2
removed bogus acl node
Jun 18, 2013
0897bfe
fixed translation helper name
Jun 18, 2013
a5c1884
added mass actions block and actions column
Jun 18, 2013
6cc04a0
fixed exception handler in massDeleteAction()
Jun 18, 2013
3d9b41a
fixed mass delete implementation
Jun 19, 2013
40631c7
MAGE-471: added check, which skips caching headers if messages should…
Jul 26, 2013
85299f6
MAGE-471: added check, which skips caching headers if messages should…
Jul 26, 2013
dd2ea56
MAGE-471: added slightly modified changes again
Sep 4, 2013
74bed35
Merge pull request #3 from AOEmedia/MAGE-471
Sep 6, 2013
12f7db0
added registry-based custom max-age settings for special cases like s…
bastianccm Nov 7, 2013
db3475c
refactored codestyle, updated folder structure to match magentos stru…
bastianccm Nov 13, 2013
6b9d164
initial merging from Aoe_PurgeStatic (based on Magneto_Varnish and Ao…
bastianccm Nov 20, 2013
7641989
added missing files
bastianccm Nov 20, 2013
e9fdc2f
fixes and phpdoc
bastianccm Nov 20, 2013
44a2741
implemented tag-based purging
bastianccm Nov 20, 2013
ae2c799
fixes
bastianccm Nov 20, 2013
093e5db
updated vcl from varnish 2 to 3 and added BAN
bastianccm Nov 20, 2013
b8f1cee
fixed cache purging
bastianccm Nov 21, 2013
331032a
fixed X
bastianccm Nov 21, 2013
b93e1f2
added cache-type invalidation and checks if cache is enabled
bastianccm Nov 21, 2013
3badb2c
renamed phone to aoestatic route name
bastianccm Nov 21, 2013
b4ab5bf
added API methods
bastianccm Nov 21, 2013
4f79e08
small code cleanup (phpmd)
bastianccm Nov 21, 2013
d2765ef
fixed some minor bugs
bastianccm Nov 27, 2013
3488958
fixed variable name
bastianccm Nov 27, 2013
5bbee4a
removed blacklist url patterns
bastianccm Nov 27, 2013
4dddf4a
Added configuration options for
Nov 27, 2013
04a1374
Added license, dummy readme and cleaned up class comments
Nov 27, 2013
8cf8586
Fixed typos
Nov 27, 2013
ca68d48
Fixed warning
Nov 27, 2013
621c61e
added url purging after a custom max-age is set
bastianccm Nov 28, 2013
861daae
fixed max-age bug
bastianccm Nov 28, 2013
4ffbc36
fixed caching bug
bastianccm Dec 4, 2013
1509617
Work in progress
Dec 5, 2013
fe9ef3b
fixed some typos and bugs
bastianccm Dec 11, 2013
000d818
added more details to mage::log
bastianccm Dec 11, 2013
0ab3ca0
Merge branch 'cookies' into refactored
bastianccm Dec 12, 2013
f1bab0b
added a default customer cookie scope
bastianccm Dec 13, 2013
794480c
added a default customer cookie scope
bastianccm Dec 13, 2013
610ccba
fixed cookie scope
bastianccm Dec 13, 2013
6f852da
fixed issues in modman file with ./
bastianccm Jan 7, 2014
f128615
fixed bug with new-product widgets
bastianccm Jan 7, 2014
5d98bb0
added store-level to tag-based caching
bastianccm Jan 7, 2014
7a204da
Fix scope portion of cookie name for customer scope
LeeSaferite Jan 13, 2014
705d010
MAGE-726: Fix tests
Feb 24, 2014
0a84e51
Fixed MAGE-784: No message during recension save is shown on product …
Zyava May 19, 2014
11a70c2
Merge pull request #4 from AOEpeople/master
fbrnc May 31, 2014
dacc98e
added missing constant and fixed 2 missing ; in js
bastianccm Jul 24, 2014
d8a4923
Fixing bug with customer login state
LeeSaferite Jul 11, 2014
62cb033
Code cleanup
LeeSaferite Jul 11, 2014
76228cb
Remove commented debug code
LeeSaferite Jul 11, 2014
251225e
Change how testing 'no-cache' section works
LeeSaferite Jul 11, 2014
5ccbcf1
Change the ban behaviour to work better with the ban lurker process
LeeSaferite Jul 11, 2014
5832a14
Update the cookie plugin
LeeSaferite Jul 11, 2014
99d1708
Simplify tag banning to a single call per server by using a regex pat…
LeeSaferite Jul 11, 2014
46ed450
Add missing logged in flag cookie
LeeSaferite Jul 11, 2014
a31e48c
Change delimiter to a space
LeeSaferite Jul 11, 2014
581b43e
Switch to X-Tags as the header for storage and BAN
LeeSaferite Jul 11, 2014
bae0f11
Bump version
LeeSaferite Jul 23, 2014
1555fb4
replaced unset with remove (varnish vcl) because unset is deprecated
Zyava Jul 24, 2014
7d039b6
added support for old format - comma-separated list of servers
Zyava Jul 25, 2014
481ea6b
added asynccache for tags
bastianccm Jul 25, 2014
889fdcd
Merge branch 'refactored' of github.com:AOEmedia/Aoe_Static into refa…
bastianccm Jul 25, 2014
3627fa2
Prevent pipe from handling multiple requests
LeeSaferite Jul 24, 2014
3badc0c
Move where info header is added
LeeSaferite Jul 24, 2014
20c0ded
Move BAN/PURGE to top of recv processing
LeeSaferite Jul 24, 2014
97fcc29
Update X-Forwarded-For header only on initial processing
LeeSaferite Jul 24, 2014
1e3de07
Move location of static file request cookie removal
LeeSaferite Jul 24, 2014
ece097a
Comment cleanup
LeeSaferite Jul 24, 2014
419ca3b
Refactor VCL and supporting code
LeeSaferite Jul 28, 2014
8b6fa91
Bump version
LeeSaferite Jul 28, 2014
3bb6527
Change where the async cache job is created
LeeSaferite Jul 28, 2014
c0ca61d
Bump version
LeeSaferite Jul 28, 2014
bd81aa7
Fixing bug with URL banning via regex
LeeSaferite Jul 29, 2014
4f6bcee
Bump version
LeeSaferite Jul 29, 2014
9d8f101
Adding proxy header handling for client.ip and ACL checking
LeeSaferite Jul 29, 2014
6218462
Split backends and ACLs into different files
LeeSaferite Jul 29, 2014
13a57a1
Apply configuration only if request is dispatched
Jul 30, 2014
c621b8a
Adding missing PHPDoc
LeeSaferite Aug 6, 2014
3b6c410
Change how layout handles are added
LeeSaferite Aug 6, 2014
c330c4c
Minor refactor of observer
LeeSaferite Aug 6, 2014
222b0ea
added basic composer.json
zohmi Jan 21, 2015
507284a
fixed identifier in anonymous function
bastianccm Jan 30, 2015
25656a2
added secure controller action
bastianccm Jan 30, 2015
6143052
added message retriever, extended js event
bastianccm Jan 30, 2015
cecab0e
refactored logic and cleaned up code
bastianccm Jan 30, 2015
af197f3
always call home to get newest messages
bastianccm Jan 30, 2015
276a17d
fixed possible session init error in magento EE 1.14.1.0 on multi-ser…
bastianccm Feb 11, 2015
2b661c8
added localStorage cache to speed up page-render
bastianccm Feb 12, 2015
c6ce840
[ENH] Implement event listener for changelog events
Mar 19, 2015
2e75b5c
Merge pull request #6 from afirlejczyk/refactored
jadhub Apr 28, 2015
b1e30c1
added new event trigger
bastianccm Jun 2, 2015
4e3dd3c
Adds tagging of the configurable product single view page with child …
tmotyl Jul 9, 2015
b79ca52
Fix recently viewed products
tmotyl Jun 1, 2015
dd4e763
added end-of-live readme
bastianccm Sep 4, 2015
391aa35
Merge pull request #10 from macopedia/fixForRecentlyViewed
bastianccm Sep 4, 2015
e9465a9
Merge pull request #8 from macopedia/tagProductPageWithSimple
bastianccm Sep 4, 2015
4becc6d
Add additional fields to Cache-Control for uncached contents
Oct 19, 2015
e511e4c
Prevent throwing js errors if saving in localStorage is not allowed
Nov 3, 2015
2c4421a
remove SID from indexAction
bastianccm Nov 26, 2015
37e6124
trimming customer name
bastianccm Nov 26, 2015
218d2ec
fixed login detection
bastianccm Dec 3, 2015
9246db8
fixed === to ==
Dec 3, 2015
99ef2af
Varnish 4.0 VCL
Dec 22, 2015
8351feb
Merge pull request #13 from kubaceg/refactored
fbrnc Dec 22, 2015
bfd344b
Fixed label after successful purge
Dec 23, 2015
88347d3
Merge pull request #14 from kubaceg/refactored
fbrnc Dec 23, 2015
42692d3
Add bower.json
mathiasschopmans Jan 27, 2016
c5d4a4d
Add backend setting which enables verbose logging.
tmotyl Jul 20, 2015
135d78a
Clear Varnish cache when simple product goes out of stock
tmotyl Jul 9, 2015
c7eb022
Merge pull request #9 from macopedia/purgeWhenStockStatusChanges
LeeSaferite Mar 17, 2016
2072d9a
Merge pull request #11 from macopedia/configurableLogging
LeeSaferite Mar 17, 2016
891111e
Merge branch 'master' into refactored
Jul 14, 2016
326529a
Refactored Varnish Purge Adapter
Jul 19, 2016
4592eaf
Introduced SNS purge adapter
Jul 19, 2016
f17dabe
Added shell script
Jul 19, 2016
a323f42
Merge pull request #16 from AOEpeople/feature/purge_via_sns
fbrnc Jul 19, 2016
7ea34d5
Fix typo
Jul 22, 2016
c43eee1
Added more shell commands
Jul 26, 2016
0c22cf7
Removed old aoemedia.de email addresses
Aug 5, 2016
753a8dc
Preparing EsiController (WIP)
Aug 5, 2016
0c66452
Removed empty file
Aug 7, 2016
e345d12
Added ESI block
Aug 7, 2016
959cc9e
Added support for caching (not tested yet)
Aug 7, 2016
e835949
Added flag that allows skipping rendering ESI placeholder child blocks
Aug 17, 2016
2b679b9
Merge branch 'feature/esi'
Aug 18, 2016
12c6a5c
Added HTML comments for better insight
Aug 18, 2016
5ad682d
[BUGFIX] Rename EsiPlaceholder::getUrl to getEsiUrl
mathiasschopmans Aug 22, 2016
18ae3d0
Add option to avoid E.T. phone home if block content is available in …
Sep 5, 2016
b7caeec
Add possibility to overwrite xml settings via cache control singleton…
tessig Nov 24, 2016
ba3ccdb
[BUGFIX] Add public method to get enabled flag from cache control
tessig Nov 24, 2016
168ca93
Load the current product in call controller
Mar 23, 2017
5f3dc70
Allow to skip usage of localstorage
Mar 24, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions Aoe_Static.xml

This file was deleted.

674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# AOE Static

Changelog

* Renamed placeholder class from .placeholder to .as-placeholder (This is a breaking change!)
4 changes: 4 additions & 0 deletions acl.vcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
acl cache_acl {
"127.0.0.1";
# insert additional ip's here
}
37 changes: 37 additions & 0 deletions app/code/community/Aoe/Static/Block/Adminhtml/CustomUrl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* Class Aoe_Static_Block_Adminhtml_CustomUrl
*
* @author Dmytro Zavalkin
*/
class Aoe_Static_Block_Adminhtml_CustomUrl extends Mage_Adminhtml_Block_Widget_Grid_Container
{
/**
* Block constructor
*/
public function __construct()
{
$this->_blockGroup = 'aoestatic';
$this->_controller = 'adminhtml_customUrl';
$this->_headerText = Mage::helper('aoestatic')->__('Urls max-age management');

parent::__construct();

if ($this->_isAllowedAction('save')) {
$this->_updateButton('add', 'label', Mage::helper('aoestatic')->__('Add new custom url'));
} else {
$this->_removeButton('add');
}
}

/**
* Check permission for passed action
*
* @param string $action
* @return bool
*/
protected function _isAllowedAction($action)
{
return Mage::getSingleton('admin/session')->isAllowed('system/aoestatic_customUrl/' . $action);
}
}
70 changes: 70 additions & 0 deletions app/code/community/Aoe/Static/Block/Adminhtml/CustomUrl/Edit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php
/**
* Class Aoe_Static_Block_Adminhtml_CustomUrl_Edit
*
* @author Dmytro Zavalkin
*/
class Aoe_Static_Block_Adminhtml_CustomUrl_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
{
/**
* Initialize edit form container
*/
public function __construct()
{
$this->_objectId = 'id';
$this->_blockGroup = 'aoestatic';
$this->_controller = 'adminhtml_customUrl';

parent::__construct();

if ($this->_isAllowedAction('save')) {
$this->_updateButton('save', 'label', Mage::helper('aoestatic')->__('Save custom url'));
$this->_addButton('saveandcontinue', array(
'label' => Mage::helper('aoestatic')->__('Save and Continue Edit'),
'onclick' => 'saveAndContinueEdit()',
'class' => 'save',
), -100);
} else {
$this->_removeButton('save');
}

if ($this->_isAllowedAction('delete')) {
$this->_updateButton('delete', 'label', Mage::helper('aoestatic')->__('Delete custom url'));
} else {
$this->_removeButton('delete');
}

$this->_formScripts[] = "
function saveAndContinueEdit(){
editForm.submit($('edit_form').action+'back/edit/');
}
";
}

/**
* Retrieve text for header element depending on loaded page
*
* @return string
*/
public function getHeaderText()
{
if (Mage::registry('custom_url')->getId()) {
return Mage::helper('aoestatic')->__("Edit custom url (ID: %d)",
$this->escapeHtml(Mage::registry('custom_url')->getId())
);
} else {
return Mage::helper('aoestatic')->__('New custom url');
}
}

/**
* Check permission for passed action
*
* @param string $action
* @return bool
*/
protected function _isAllowedAction($action)
{
return Mage::getSingleton('admin/session')->isAllowed('system/aoestatic_customUrl/' . $action);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?php
/**
* Class Aoe_Static_Block_Adminhtml_CustomUrl_Edit_Form
*
* @author Dmytro Zavalkin
*/
class Aoe_Static_Block_Adminhtml_CustomUrl_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
{
/**
* Set form id and title
*/
public function __construct()
{
parent::__construct();
$this->setId('custom_url_form');
$this->setTitle(Mage::helper('aoestatic')->__('Custom urls'));
}

/**
* Prepare form layout
*
* @return $this
*/
protected function _prepareForm()
{
/** @var $model Aoe_Static_Model_CustomUrl */
$model = Mage::registry('custom_url');

$form = new Varien_Data_Form(
array(
'id' => 'edit_form',
'action' => $this->getData('action'),
'method' => 'post'
)
);

// set form data either from model values or from session
$formValues = array(
'store_id' => $model->getStoreId(),
'request_path' => $model->getRequestPath(),
'max_age' => $model->getMaxAge(),
);

$fieldset = $form->addFieldset('base_fieldset', array(
'legend' => Mage::helper('aoestatic')->__('Custom urls')
));

// get store switcher or a hidden field with its id
if (!Mage::app()->isSingleStoreMode()) {
$stores = Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm();
$element = $fieldset->addField('store_id', 'select', array(
'label' => Mage::helper('aoestatic')->__('Store'),
'title' => Mage::helper('aoestatic')->__('Store'),
'class' => 'required-entry',
'name' => 'store_id',
'required' => true,
'values' => $stores,
'value' => $formValues['store_id'],
));
$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');
$element->setRenderer($renderer);
} else {
$fieldset->addField('store_id', 'hidden', array(
'name' => 'store_id',
'value' => Mage::app()->getStore(true)->getId()
));
}

$fieldset->addField('request_path', 'text', array(
'label' => Mage::helper('aoestatic')->__('Request Path'),
'title' => Mage::helper('aoestatic')->__('Request Path'),
'class' => 'required-entry',
'name' => 'request_path',
'required' => true,
'value' => $formValues['request_path']
));

$fieldset->addField('max_age', 'text', array(
'label' => Mage::helper('aoestatic')->__('Max Age'),
'title' => Mage::helper('aoestatic')->__('Max Age'),
'class' => 'required-entry validate-digits',
'name' => 'max_age',
'required' => true,
'value' => $formValues['max_age']
));

$form->setUseContainer(true);
$form->setAction(Mage::helper('adminhtml')->getUrl('*/*/save', array('id' => $model->getId())));
$this->setForm($form);

return parent::_prepareForm();
}
}
129 changes: 129 additions & 0 deletions app/code/community/Aoe/Static/Block/Adminhtml/CustomUrl/Grid.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?php
/**
* Class Aoe_Static_Block_Adminhtml_CustomUrl_Grid
*
* @author Dmytro Zavalkin
*/
class Aoe_Static_Block_Adminhtml_CustomUrl_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
/**
* Init grid default properties
*/
public function __construct()
{
parent::__construct();
$this->setId('custom_url_list_grid');
$this->setDefaultSort('custom_url_id');
$this->setUseAjax(true);
}

/**
* Prepare collection for grid
*
* @return $this
*/
protected function _prepareCollection()
{
/** @var $collection Aoe_Static_Model_Resource_CustomUrl_Collection */
$collection = Mage::getResourceModel('aoestatic/customUrl_collection');

$this->setCollection($collection);
return parent::_prepareCollection();
}

/**
* Return row URL for js event handlers
*
* @param Aoe_Static_Model_CustomUrl $row
* @return string
*/
public function getRowUrl($row)
{
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
}

/**
* Prepare Grid columns
*
* @return $this
*/
protected function _prepareColumns()
{
$this->addColumn('custom_url_id', array(
'header' => Mage::helper('aoestatic')->__('ID'),
'width' => '10px',
'index' => 'custom_url_id'
));

if (!Mage::app()->isSingleStoreMode()) {
$this->addColumn('store_id', array(
'header' => Mage::helper('aoestatic')->__('Store View'),
'width' => '200px',
'index' => 'store_id',
'type' => 'store',
'store_view' => true,
));
}

$this->addColumn('request_path', array(
'header' => Mage::helper('aoestatic')->__('Request Path'),
'width' => '80%',
'index' => 'request_path'
));
$this->addColumn('max_age', array(
'header' => Mage::helper('aoestatic')->__('Max Age'),
'width' => '50px',
'index' => 'max_age'
));

$this->addColumn('action',
array(
'header' => Mage::helper('aoestatic')->__('Actions'),
'width' => '50px',
'type' => 'action',
'getter' => 'getId',
'actions' => array(
array(
'caption' => Mage::helper('aoestatic')->__('Delete'),
'url' => array(
'base' => '*/*/delete',
),
'field' => 'id',
'confirm' => Mage::helper('aoestatic')->__('Are you sure you want to delete custom url?')
)
),
'filter' => false,
'sortable' => false,
)
);

return parent::_prepareColumns();
}

/**
* Prepare grid massaction actions
*
* @return $this
*/
protected function _prepareMassaction()
{
$this->setMassactionIdField('custom_url_id');
$this->getMassactionBlock()->setFormFieldName('custom_url_ids');
$this->getMassactionBlock()->addItem('delete', array(
'label' => Mage::helper('aoestatic')->__('Delete'),
'url' => $this->getUrl('*/*/massDelete'),
'confirm' => Mage::helper('aoestatic')->__('Are you sure you want delete selected custom url(s)?')
));

return $this;
}
/**
* Grid url getter
*
* @return string current grid url
*/
public function getGridUrl()
{
return $this->getUrl('*/*/grid', array('_current' => true));
}
}
3 changes: 3 additions & 0 deletions app/code/community/Aoe/Static/Block/Adminhtml/Purge.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

class Aoe_Static_Block_Adminhtml_Purge extends Mage_Adminhtml_Block_Template {}
Loading