WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.33k stars 4.12k forks source link

Consider adding Core Data for /search REST API endpoint #51411

Open getdave opened 1 year ago

getdave commented 1 year ago

We don't currently have any way to interact with the /search/ endpoint using Core Data.

The major consumer of this endpoint in the editor is the Link UI which calls it every time it is initiated. This means each instance will call the endpoint and there is no caching or standard way to observe the resolution.

Let's consider making this part of Core Data.

youknowriad commented 1 year ago

I think it makes sense to have search part of core data but searching has a tendency to keep potentially a lot of Kbits in the store. So we need to be careful about whether we want this to behave as any other selector/resolver or if we want some "expire date" or something like that to "clear" the memory after some time and avoid a forever growing cache.