Make WordPress Core

Opened 11 years ago

Closed 8 weeks ago

#26806 closed enhancement (wontfix)

Add support for custom SHORTINIT handlers

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

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 11 years ago.

Download all attachments as: .zip

Change History (10)

#2 @mgibbs189
11 years ago

  • Keywords has-patch dev-feedback added

#3 @SergeyBiryukov
11 years ago

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

#4 @nacin
11 years ago

  • Component changed from General to Bootstrap/Load

#5 in reply to: ↑ description @jeremyfelt
11 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.


8 years ago

#8 @jorbin
4 months ago

  • Keywords close added

The gist that wants to demonstrate usasge no longer is available. I also tend to agree with @jeremyfelt that using the existing dropins (or combining with them) is a better solution that adding a new directory and additional extremely early loading code.

As such, I'm going to recomend this be closed as wontfix but will leave this open to hear objections.

#9 @JeffPaul
8 weeks ago

  • Resolution set to wontfix
  • Status changed from new to closed

I concur, close.

Note: See TracTickets for help on using tickets.