RDF data in resource files are cached
Closed this issue · 1 comments
I am loading local data from my resources directory like this:
(ont-app.igraph-jena.core/load-rdf (clojure.java.io/resource "locationdata.ttl"))
This file is cached to /tmp/rdf-app/UrlCache/
. On subsequent runs, the data is always loaded from the cache, and changes to the file content cannot be imported in this way. The changed contents can be loaded like this:
(ont-app.igraph-jena.core/load-rdf "resources/locationdata.ttl")
or even like this
(ont-app.igraph-jena.core/load-rdf (clojure.java.io/file (clojure.java.io/resource "locationdata.ttl")))
But neither of these is a good solution.
Suggestion:
A resource file should not be cached at all. (An perhaps add an example on how to invalidate the cache; from the code I suspect such a way exists, but I cannot make out how to do that.)
(Edit: Damn, I guess this should be an issue of the https://github.com/ont-app/igraph-jena, not here.)
Thank for this. We definitely want to keep our caches fresh.
Done when:
- An existing resource can be loaded with rdf/load-rdf
- Said resource is altered
- Cache of said resource is invalidated automatically if possible, otherwise there's a clear-cache! operation.
- Consider providing for specification of a caching policy for each resource
- tests and documentation are updated appropriately