https://redmine.gc.cuny.edu/https://redmine.gc.cuny.edu/favicon.ico2020-09-18T19:46:01ZCUNY Graduate Center - Project Tracking SystemCUNY Academic Commons - Bug #13346: Update cache drop-in to support wp_cache_get_multiple()https://redmine.gc.cuny.edu/issues/13346?journal_id=548292020-09-18T19:46:01ZBoone Gorgesboone@gorg.es
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/13341">Bug #13341</a>: Forum reply problems</i> added</li></ul> CUNY Academic Commons - Bug #13346: Update cache drop-in to support wp_cache_get_multiple()https://redmine.gc.cuny.edu/issues/13346?journal_id=552662020-10-05T21:41:47ZBoone Gorgesboone@gorg.es
<ul></ul><p>My first pass at this is in the following changesets: <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/9b394cfaded6a4c4897485bb5aeda848ffc838e5">https://github.com/cuny-academic-commons/cac/commit/9b394cfaded6a4c4897485bb5aeda848ffc838e5</a>, <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/9f72271d78851b09af9f057b139ca70664de22c8">https://github.com/cuny-academic-commons/cac/commit/9f72271d78851b09af9f057b139ca70664de22c8</a></p>
<p>It appears that the <code>getMulti()</code> support in the original HM drop-in is sort of broken. It builds derived keys from the key+group combos passed to the method, and then it uses those <strong>derived</strong> keys to store the values, so that they're never found. After I figured this out, I now see that it was fixed separately by the HM folks :) <a class="external" href="https://github.com/humanmade/wordpress-pecl-memcached-object-cache/pull/8/files">https://github.com/humanmade/wordpress-pecl-memcached-object-cache/pull/8/files</a></p>
<p>I have to step away for the moment, but I'll review in the next few days to see if it's better to merge the upstream changes before implementing <code>wp_cache_get_multiple()</code>.</p> CUNY Academic Commons - Bug #13346: Update cache drop-in to support wp_cache_get_multiple()https://redmine.gc.cuny.edu/issues/13346?journal_id=552782020-10-06T14:59:12ZBoone Gorgesboone@gorg.es
<ul></ul><p>In <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/a80f4ee51d0ee1687c9b4fceeb180d67bb741e14">https://github.com/cuny-academic-commons/cac/commit/a80f4ee51d0ee1687c9b4fceeb180d67bb741e14</a> I updated our implementation to the "refactor" branch of the HM repo. Neither that branch nor the master branch has been updated in several years, but the refactor branch includes the necessary fixes for <code>getMulti()</code>, so I went with it. The refactor branch also eliminates a huge amount of unused boilerplate code, making it easier to figure out what's going on in the drop-in.</p>
<p>In <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/751ea46e56b3177395a98919ffdceaa85e59f17c">https://github.com/cuny-academic-commons/cac/commit/751ea46e56b3177395a98919ffdceaa85e59f17c</a> I re-added support for <code>wp_cache_get_multiple()</code>. I've run through some tests locally and on cdev (where we run the same instance of Memcached as the production site) and it appears that cache multi-fetches in WP Core are working properly.</p> CUNY Academic Commons - Bug #13346: Update cache drop-in to support wp_cache_get_multiple()https://redmine.gc.cuny.edu/issues/13346?journal_id=552822020-10-06T15:24:37ZBoone Gorgesboone@gorg.es
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p>In <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/78e4bd750b44cb612efe64515c985eb242e0629e">https://github.com/cuny-academic-commons/cac/commit/78e4bd750b44cb612efe64515c985eb242e0629e</a> I updated advanced-post-cache to the bleeding edge from the GitHub repo. The main changes here are the new filters for excluding queries for certain post types from the cache.</p>
<p>In <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/092980b5cd485b01b495118ac459ce06cef76b30">https://github.com/cuny-academic-commons/cac/commit/092980b5cd485b01b495118ac459ce06cef76b30</a> I made the necessary changes so that the plugin uses our new <code>wp_cache_get_multiple()</code>. I've tested this change and it appears to be working properly.</p>