Not a Bug

This is marked as not a bug with concrete5 core.

on_start() defined in a package does not fire when Full Page Cache is on

Permalink 16 14 Browser Info Environment
I wonder if this is a bug or feature but it seems that if I declare on_start() function inside a package controller, it won't get fired if Full Page Caching is on. The function is declared as following:

public function on_start() {
            $l = new Log('testing', true);

On a "cache-clean" page load the event is fired a row is added to Logs table, but after page has been full-page cached no logging occurs. On pages that contains non-cacheable blocks every page load creates a log entry.

Status: Not a Bug

Still Valid:

This bug is valid a newer version of concrete5. View Current Bug
andrew replied on at Permalink
That is a feature. We used to have full page caching fire later in the process but the flexibility is far outweighed by the speed benefits of having it fire early.
Ale replied on at Permalink
Thanks for your reply. I wonder if this correct place to continue discussion, but I'd like to ask what would be the best place in a package to add some code that should be executed on every page load, be the page cached or not? Would it require overriding/extending some core model(s)? Theme header/element is not possible in my case.
aghouseh replied on at Permalink
I'm running a modified version of Mnkras' page redirect attribute, and it's completely not firing when the user is logged out, as it uses the on_start() event as well. Is there a suggested event/method that will still fire even though caching is enabled?
JohntheFish replied on at Permalink
That sounds more like a bug than a feature to me. :)

Some discussion has started at

concrete5 Environment Information

# concrete5 Version

# concrete5 Packages
Designer Content (3.1.1), eCommerce (2.8.7), tnSpacer (1.2).

# concrete5 Overrides
blocks/autonav, blocks/cart_links, blocks/login, blocks/page_list, blocks/product, blocks/product_list, blocks/slideshow, elements/product, mail/order.php, mail/receipt.php, single_pages/checkout

# Server Software

# Server API

# PHP Version

# PHP Extensions
bcmath, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, filter, ftp, gd, gettext, hash, iconv, imap, json, libxml, mbstring, mcrypt, memcache, mhash, mysql, mysqli, mysqlnd, odbc, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, Reflection, session, SimpleXML, soap, SPL, standard, tidy, tokenizer, wddx, wincache, XCache, xml, xmlreader, xmlrpc, xmlwriter, zip, zlib.

# PHP Settings
max_execution_time - 300
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 200M
post_max_size - 140M
sql.safe_mode - Off
upload_max_filesize - 140M
memcache.max_failover_attempts - 20
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
wincache.maxfilesize - 256
wincache.ttlmax - 1200
xcache.var_maxttl - 0

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0