Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-17385

Reducing use of file_exists

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Obsolete
    • Icon: Medium Medium
    • None
    • 4.1.4, 4.2.0, 4.3.0, 4.4.0
    • Caching
    • None

    Description

      Each time eZ Publish is called to load a page, run a cronjob etc, the code checks whether eztemplateautoload.php exists or not in extension.

      This is done in lib/ezutils/classes/eztemplate.php in eZTemplate::autoload(). Template's functions and operators don't change every day. This is why we can create a cache file which will remove a great number of call to file_exists.

      The attached file creates a cache file in eZSys::cacheDirectory() which will reload itself every 6 hours.

      It creates a cache file only for eztemplateautoload.php files in the extension directory. We can't add kernel or lib files to it because some functions are declared in theses files so we still need to include them.

      It would be interesting to add to setup/cache view in the admin siteaccess the possibility to flush this cache file.

      Attachments

        Activity

          People

            Unassigned Unassigned
            8bc12bd8-4b86-4b97-8f96-13978c04c7fa@accounts.ibexa.co Jérémy Poulain
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: