it would help the code in Schrodicache a great deal if the created time for items had a better granularity than a second.

replacing time() with microtime(TRUE) greatly increases the hit rate from APC when using Schrodicache. simple patch against 7.x-1.x attached.

CommentFileSizeAuthor
#2 2259103-2.patch434 bytesAnonymous (not verified)
microtime-created.patch424 bytesAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

msonnabaum’s picture

I agree with the general idea, but I would prefer to see it rounded a bit. Surely we don't need the full precision here.

Anonymous’s picture

FileSize
434 bytes

seems reasonable, new patch does that.

Anonymous’s picture

Issue summary: View changes
Anonymous’s picture

Issue summary: View changes
catch’s picture

Status: Needs review » Fixed

Committed/pushed to 7.x-1.x, thanks!

  • Commit bb8d0b0 on 7.x-1.x by catch:
    Issue #2259103 by beejeebus: Set cache->created with microtime(), not...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Jeremy’s picture

Jeremy’s picture

We had to undo this change as it cased a regression. For solutions like Schrodicache preferring higher precision, use $cache->created_microtime if existing instead of $cache->created.
http://cgit.drupalcode.org/memcache/commit/?id=a6a1ca8