Post by budgetneon » Thu Oct 16, 2014 5:12 am

We've ported our page cache over and have it running with Opencart 2.X.

Available at: the extension directory or GitHub.

Please install this quick fix for the opencart extension installer first.

It is:
  • * Trivally easy to install, uses the opencart 2.x extension installer (but install this first)
    * Fast, as it skips most of the opencart code, database calls, etc, by operating/exiting at the very top of the main index.php file when serving from the cache.
    * Semi-smart. Has logic to determine what NOT to cache. For example, won't serve cached pages if you're logged in, or if you have items in your cart, or are on an https:// page. Also has regex patterns to exclude, for example, product comparison urls. Only caches items that return an HTTP 200 status.
    * Open source (FreeBSD license)
It is not:
  • * extensively tested. The onus is on you to test before deploying to production.
    * magic. (it only serves cached pages to guest users. it does not automatically flush cache as stock levels change, it doesn't know not to cache urls from some dynamic extension you just loaded, etc)
    * happy about PHP 5.3. You need to have PHP5.4 or better. It does not run well without that.
Feedback, either here, or on the github page is welcome.

Screenshot of the admin panel below:

Image

New member

Posts

Joined
Sat Sep 20, 2014 11:32 pm


Post by budgetneon » Sat Jan 03, 2015 11:49 pm

Updated version 1.0.7. More documentation regarding charsets and locales, and a fix for some missing logic that could have caused 404 pages to be cached.

New member

Posts

Joined
Sat Sep 20, 2014 11:32 pm


Post by budgetneon » Sun Mar 06, 2016 5:22 am

Bumped to version 1.1.0

Added:
  • Support caching https pages, but cached separately from http
  • Support Opencart 2.1.x and 2.2.x
    • Because oc >= 2.1.x eliminated the cart session variable, had
      to add logic to query cart to see if empty on every non-cached page
      load (regrettable, but the simplest solution)
  • Add newer style constructors so it works with PHP7.x
Download from either:

opencart extension area
or
GitHub

Feedback welcome. Note that to make this work with 3rd party themes, you would likely need to identify urls that should not be cached and add them to the skip_urls setting.

New member

Posts

Joined
Sat Sep 20, 2014 11:32 pm

Who is online

Users browsing this forum: No registered users and 3 guests