[wp-trac] [WordPress Trac] #19564: Helper function for getting/setting cache data
WordPress Trac
noreply at wordpress.org
Tue Aug 13 16:48:33 UTC 2013
#19564: Helper function for getting/setting cache data
-----------------------------+------------------------------
Reporter: johnjamesjacoby | Owner: johnjamesjacoby
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Cache | Version: 3.3
Severity: normal | Resolution: wontfix
Keywords: has-patch |
-----------------------------+------------------------------
Changes (by nacin):
* status: assigned => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
I'm going to close this for now.
As scribu said many months ago, you probably require a lot of information
about the current process. Such a callback would likely be a closure that
passes in information from current scope and such. Which is not bad, but
this also isn't a pattern I've seen in any other caching backend, at least
ones with popular PHP libraries. get/set/add/increment/decrement/etc are
all standard. Something along the lines of "attempt" is not.
You also typically do not want to set a cache value until after you have
performed your work and are positive things are successful. This would
make things much more difficult to catch, wait, etc. It's just a bit over-
abstracted.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19564#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list