[wp-trac] [WordPress Trac] #50025: Media Library not showing new uploads when filtering by date
WordPress Trac
noreply at wordpress.org
Fri Dec 11 23:14:22 UTC 2020
#50025: Media Library not showing new uploads when filtering by date
--------------------------+------------------------------
Reporter: teamdnk | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.7
Component: Media | Version: 5.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses: ui, javascript
--------------------------+------------------------------
Comment (by adamsilverstein):
In [attachment:"50025.diff"]:
* Remove the query caching mechanism, which was buggy and did not support
invalidation when the media collection changed.
The issue with the caching was that the cache was never invalidated. After
digging into how to fix this for a while, I discovered invalidating this
caching when a new image is uploaded is difficult. Because of the way the
cache was wrapped up inside the query object, triggering an external
invalidation would require significant re-architecting.
Instead, I have opted to remove the simplistic caching entirely; media
will now be re-queried when you change filter settings, regardless of
whether you have seen that filtered view before. I don't think the caching
added much value for users.
@afercia Can you test this to verify it fixes the original issue you
described (not the bit about date menu populating only at load time). It
does in my testing.
@antpb does removing the caching here seem like a reasonable compromise?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50025#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list