[wp-trac] [WordPress Trac] #25308: wp_cache_set, wp_cache_add, set_transient should handle and notify on non-ints expirations
WordPress Trac
noreply at wordpress.org
Fri Sep 13 21:32:42 UTC 2013
#25308: wp_cache_set, wp_cache_add, set_transient should handle and notify on non-
ints expirations
------------------------------------+--------------------
Reporter: andreasnrb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.7
Component: Cache | Version: 3.6.1
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+--------------------
Comment (by c3mdigital):
Replying to [comment:8 andreasnrb]:
> @c3digital
> "Currently plugin and theme developers pass strings and other types as
expirations"
> Should have written "can" and in some cases it does happen. Cant do a
search like that you need to check variables and where they originate
from. Point is APC and perhaps other cache engines don't accept strings or
other types. They give warning. I think WordPress should do the same to
promote better developer methodology.
I'm not saying it can't happen or doesn't but from the 30 or 40 plugins I
looked at, the developers either didn't set an expiration, assigned an
integer to a variable (yes I traced the origin ) like $expiration = 60 *
60 * 10, or put an integer in directly.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25308#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list