WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 4 months ago

#26806 new enhancement

Add support for custom SHORTINIT handlers

Reported by: mgibbs189 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Bootstrap/Load Keywords: has-patch dev-feedback reporter-feedback
Focuses: Cc:
PR Number:

Description

I'm building ajax caching for a plugin and need a handler to conditionally determine whether to continue loading WP (based on whether a cached version exists).

Example handler file: https://gist.github.com/mgibbs189/8345521

The SHORTINIT constant along with wp-load.php isn't an option because it forces WP to exit early.

Drop-ins like advanced-cache.php, object-cache.php, or db.php won't work because only 1 plugin at a time can use them. I need for my caching to work in combination with these other plugins (e.g. W3 Total Cache)

Attachments (1)

wp-settings.php.patch (663 bytes) - added by mgibbs189 6 years ago.

Download all attachments as: .zip

Change History (8)

#2 @mgibbs189
6 years ago

  • Keywords has-patch dev-feedback added

#3 @SergeyBiryukov
6 years ago

  • Component changed from Database to General
  • Version changed from trunk to 3.8

#4 @nacin
6 years ago

  • Component changed from General to Bootstrap/Load

#5 in reply to: ↑ description @jeremyfelt
6 years ago

  • Keywords reporter-feedback added

Hi @mgibbs189, thanks for the enhancement suggestion!

Replying to mgibbs189:

Drop-ins like advanced-cache.php, object-cache.php, or db.php won't work because only 1 plugin at a time can use them. I need for my caching to work in combination with these other plugins (e.g. W3 Total Cache)

The functionality of the attached gist seems perfect for something like advanced-cache.php. I don't think we would want to add another directory to wp-content, though it is kind of appealing to have a place for multiple sunrise type files to live.

I would lean toward the idea of manual advanced cache management in which this code would exist in the same file as the advanced cache code from Batcache or W3TC. Is there a reason this can't happen or is more a matter of installation convenience?

This ticket was mentioned in Slack in #core by jorbin. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.