Skip to content

Commit ae7b75f

Browse files
authored
docs: Reference path property in caching of resources recipeI may (#1091)
1 parent 6c5e7a7 commit ae7b75f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

content/docs/recipes/caching-of-resources.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ title: Caching of Resources
1111

1212
All Frictionless Data specifications allow for referencing resources via http or a local filesystem.
1313

14-
In the case of remote resources via http, there is always the possibility that the remote server will be unavailable, or, that the resource itself will be temporarily or permanently removed.
14+
In the case of remote resources via http, there is always the possibility that the remote server will be unavailable, or, that the resource itself will be temporarily or permanently removed. If implementing systems are doing any processing or analysis with the file, they may wish to keep and reference a local copy while still pointing to the remote URL as the canonical data source.
1515

16-
Applications that are concerned with the persistent storage of data described in Frictionless Data specifications can use a `_cache` property that mirrors the functionality and usage of the `data` property, and refers to a storage location for the data that the application can fall back to if the canonical resource is unavailable.
16+
Applications that are concerned with the persistent storage of data described in Frictionless Data specifications can use a `_cache` property that mirrors the functionality and usage of the `path` or `data` properties, and refers to a storage location for the data that the application can fall back to if the canonical resource is unavailable.
1717

1818
## Implementations
1919

2020
There are no known implementations of this pattern at present.
2121

2222
## Specification
2323

24-
Implementations `MAY` handle a `_cache` property on any descriptor that supports a `data` property. In the case that the data referenced in `data` is unavailable, `_cache` should be used as a fallback to access the data. The handling of the data stored at `_cache` is beyond the scope of the specification. Implementations might store a copy of the resources in `data` at ingestion time, update at regular intervals, or any other method to keep an up-to-date, persistent copy.
24+
Implementations `MAY` handle a `_cache` property on any descriptor that supports either a `path` or `data` property. In the case that the data referenced in `path` or `data` is unavailable, `_cache` should be used as a fallback to access the data. The handling of the data stored at `_cache` is beyond the scope of the specification. Implementations might store a copy of the resources in `path` or `data` at ingestion time, update at regular intervals, or any other method to keep an up-to-date, persistent copy.
2525

2626
Some examples of the `_cache` property.
2727

@@ -31,12 +31,12 @@ Some examples of the `_cache` property.
3131
"resources": [
3232
{
3333
"name": "my-resource",
34-
"data": [ "http://example.com/data/csv/my-resource.csv" ],
34+
"path": "http://example.com/data/csv/my-resource.csv",
3535
"_cache": "my-resource.csv"
3636
},
3737
{
3838
"name": "my-resource",
39-
"data": [ "http://example.com/data/csv/my-resource.csv" ],
39+
"path": "http://example.com/data/csv/my-resource.csv",
4040
"_cache": "http://data.registry.com/user/files/my-resource.csv"
4141
},
4242
{

0 commit comments

Comments
 (0)