-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, caching uses a custom key creation function, which can still be refined #8. This function excludes the host URL and instead uses the API call type (view) and parameters dict ({"corpname": ... etc.}) to determine whether making a call is necessary.
This is intentional: it's assumed that two corpora of the same name are identical even if they're on different servers. For instance, querying the Susanne corpus locally and on Sketch Engine retrieves the same results, so SGEX shouldn't duplicate all those calls.
However, this is a narrow use case that won't fit every circumstance. SGEX should expose a means to manage identical/different corpora with identical/different names on multiple servers. Sketch Engine also uses the preloaded/ prefix for some corpora, meaning that local corpora should use the same naming conventions.
Part of this discussion may include adding additional headers to cached content to streamline how duplicate data, out of date data (e.g., for diachronic corpora), and so on can be identified.