kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

ETag and mtime for patterns #130

Open kjetilk opened 5 years ago

kjetilk commented 5 years ago

I found in my most recent experiment that there are some patterns I can compute specific etags for inexpensively, and some that I can't, see

https://github.com/kjetilk/p5-atteanx-store-filesystem/blob/master/lib/AtteanX/Store/Filesystem.pm#L196-L204

And so I figured, I'd implement the etag_value_for_quads for a quad pattern. I suppose we didn't quite intend that when we designed it, but it seems like a trivial extension, doesn't it?

The same would work for mtimes, I suppose.

kasei commented 5 years ago

I'm not sure I understand the suggestion here. Can you provide some more details?

kjetilk commented 5 years ago

I think that when we originally designed etag_value_for_quads, it would take no arguments, and would return a token that can be used as an etag for the store as a whole, i.e. if any statement in the store changed, the token would change.

The idea is that we could provide something that more fine grained, that the token for a certain quad pattern would remain constant even though a statement matched by some other pattern have changed...