Some parts of resourceloader put an integer into the BagOStuff
and rejects any value it pulls back out that is not an integer.
This patch updates the memcached client behind the BagOStuff to
flag integer values and convert them back to integer when recieved.
The end result is shaving several seconds off the time it takes to
request a CSS or JS file in certain configurations.
Bug: 60563
Change-Id: Ie4dc8cf2c2cd232a2c167b4075ff4254b656bcbc
*/
const COMPRESSED = 2;
+ /**
+ * Flag: indicates data is an integer
+ */
+ const INTVAL = 4;
+
// }}}
/**
*/
if ( $flags & self::SERIALIZED ) {
$ret[$rkey] = unserialize( $ret[$rkey] );
+ } elseif ( $flags & self::INTVAL ) {
+ $ret[$rkey] = intval( $ret[$rkey] );
}
}
$flags = 0;
- if ( !is_scalar( $val ) ) {
+ if ( is_int( $val ) ) {
+ $flags |= self::INTVAL;
+ } elseif ( !is_scalar( $val ) ) {
$val = serialize( $val );
$flags |= self::SERIALIZED;
if ( $this->_debug ) {