Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change content check before overwriting cache #15

Open
coret opened this issue Nov 1, 2023 · 0 comments
Open

Change content check before overwriting cache #15

coret opened this issue Nov 1, 2023 · 0 comments

Comments

@coret
Copy link
Contributor

coret commented Nov 1, 2023

The demonstrator get the creators, publishers and formats by doing a SPARQL query on the triplestore, the results are cached. Sometimes one of lists is empty in the user interface. A call to https://datasetregister.netwerkdigitaalerfgoed.nl/search.php with parameter ?nocache=1 make that the cache is skipped and the data is fetched from the source. Code should be changed that if there is no data for a specific SPARQL query returned, the cache should be left as is. The current check had that aim, but is not effective enough.

if (!empty($contents)) {

The check should be changed in something like that the $sparqlResults["results"]["bindings"] array has one or more elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant