Skip to content

Commit

Permalink
update cache refs to use files/md5 (#4842)
Browse files Browse the repository at this point in the history
* update cache refs to use files/md5

* Update content/docs/command-reference/unprotect.md

Co-authored-by: skshetry <[email protected]>

---------

Co-authored-by: Ruslan Kuprieiev <[email protected]>
Co-authored-by: skshetry <[email protected]>
  • Loading branch information
3 people authored Sep 7, 2023
1 parent ead54c9 commit 0aa6b10
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 31 deletions.
8 changes: 4 additions & 4 deletions content/docs/command-reference/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ This is a standard `.dvc` file with only one output (`outs` field). The hash
value (`md5` field) corresponds to a file path in the <abbr>cache</abbr>.

```cli
$ file .dvc/cache/d8/acabbfd4ee51c95da5d7628c7ef74b
.dvc/cache/61/37cde4893c59f76f005a8123d8e8e6: ASCII text
$ file .dvc/cache/files/md5/d8/acabbfd4ee51c95da5d7628c7ef74b
.dvc/cache/files/md5/61/37cde4893c59f76f005a8123d8e8e6: ASCII text
```

⚠️ Tracking compressed files (e.g. ZIP or TAR archives) is not recommended, as
Expand Down Expand Up @@ -274,8 +274,8 @@ Data and pipelines are up to date.
Let's have a look at cache directory:

```cli
$ tree .dvc/cache
.dvc/cache
$ tree .dvc/cache/files/md5
.dvc/cache/files/md5
β”œβ”€β”€ 0a
β”‚Β Β  └── ec3a687bd65c3e6a13e3cf20f3a6b2.dir
└── 52
Expand Down
8 changes: 4 additions & 4 deletions content/docs/command-reference/commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ To verify this instance of `model.pkl` is not in the cache, we must know the
path to the cached file. In the cache directory, the first two characters of the
hash value are used as a subdirectory name, and the remaining characters are the
file name. Therefore, had the file been committed to the cache, it would appear
in the directory `.dvc/cache/9a`. Let's check:
in the directory `.dvc/cache/files/md5/9a`. Let's check:

```cli
$ ls .dvc/cache/9a
ls: .dvc/cache/9a: No such file or directory
$ ls .dvc/cache/files/md5/9a
ls: .dvc/cache/files/md5/9a: No such file or directory
```

If we've determined the changes to `params.yaml` were successful, we can execute
Expand All @@ -210,7 +210,7 @@ this set of commands:
$ dvc commit
$ dvc status
Data and pipelines are up to date.
$ ls .dvc/cache/70
$ ls .dvc/cache/files/md5/70
ba000ba83b341a423a81eed8ff9238
```

Expand Down
12 changes: 6 additions & 6 deletions content/docs/command-reference/fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ $ dvc status --cloud
$ dvc fetch
$ tree .dvc/cache
.dvc/cache
$ tree .dvc/cache/files/md5
.dvc/cache/files/md5
β”œβ”€β”€ 20
β”‚ └── b786b6e6f80e2b3fcf17827ad18597.dir
β”œβ”€β”€ c8
Expand Down Expand Up @@ -210,8 +210,8 @@ $ dvc checkout
```cli
$ dvc fetch prepare
$ tree .dvc/cache
.dvc/cache
$ tree .dvc/cache/files/md5
.dvc/cache/files/md5
β”œβ”€β”€ 20
β”‚ └── b786b6e6f80e2b3fcf17827ad18597.dir
β”œβ”€β”€ 32
Expand Down Expand Up @@ -257,8 +257,8 @@ to retrieve the data up to our third stage, `train`? We can use the
```cli
$ dvc fetch --with-deps train
$ tree .dvc/cache
.dvc/cache
$ tree .dvc/cache/files/md5
.dvc/cache/files/md5
β”œβ”€β”€ 20
β”‚ └── b786b6e6f80e2b3fcf17827ad18597.dir
β”œβ”€β”€ c8
Expand Down
18 changes: 9 additions & 9 deletions content/docs/command-reference/gc.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,15 @@ not referenced in the <abbr>workspace</abbr> (by collecting hash values from the
```cli
$ dvc gc --workspace
'.dvc/cache/27e30965256ed4d3e71c2bf0c4caad2e' was removed
'.dvc/cache/2e006be822767e8ba5d73ebad49ef082' was removed
'.dvc/cache/2f412200dc53fb97dcac0353b609d199' was removed
'.dvc/cache/541025db4da02fcab715ca2c2c8f4c19' was removed
'.dvc/cache/62f8c2ba93cfe5a6501136078f0336f9' was removed
'.dvc/cache/7c4521365288d69a03fa22ad3d399f32' was removed
'.dvc/cache/9ff7365a8256766be8c363fac47fc0d4' was removed
'.dvc/cache/a86ca87250ed8e54a9e2e8d6d34c252e' was removed
'.dvc/cache/f64d65d4ccef9ff9d37ea4cf70b18700' was removed
'.dvc/cache/files/md5/27e30965256ed4d3e71c2bf0c4caad2e' was removed
'.dvc/cache/files/md5/2e006be822767e8ba5d73ebad49ef082' was removed
'.dvc/cache/files/md5/2f412200dc53fb97dcac0353b609d199' was removed
'.dvc/cache/files/md5/541025db4da02fcab715ca2c2c8f4c19' was removed
'.dvc/cache/files/md5/62f8c2ba93cfe5a6501136078f0336f9' was removed
'.dvc/cache/files/md5/7c4521365288d69a03fa22ad3d399f32' was removed
'.dvc/cache/files/md5/9ff7365a8256766be8c363fac47fc0d4' was removed
'.dvc/cache/files/md5/a86ca87250ed8e54a9e2e8d6d34c252e' was removed
'.dvc/cache/files/md5/f64d65d4ccef9ff9d37ea4cf70b18700' was removed
```

Let's check the size now:
Expand Down
8 changes: 4 additions & 4 deletions content/docs/command-reference/push.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ state. We can see exactly what that means by looking in the project's
/doc/user-guide/project-structure/internal-files#structure-of-the-cache-directory

```cli
$ tree .dvc/cache
.dvc/cache
$ tree .dvc/cache/files/md5
.dvc/cache/files/md5
β”œβ”€β”€ 02
β”‚Β Β  └── 423d88d184649a7157a64f28af5a73
β”œβ”€β”€ 0b
Expand All @@ -225,8 +225,8 @@ $ tree .dvc/cache
10 directories, 9 files
$ tree ~/vault/recursive
~/vault/recursive
$ tree ~/vault/recursive/files/md5
~/vault/recursive/files/md5
β”œβ”€β”€ 0b
β”‚Β Β  └── d48000c6a4e359f4b81285abf059b5
β”œβ”€β”€ 4a
Expand Down
2 changes: 1 addition & 1 deletion content/docs/command-reference/unprotect.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ $ ls -lh
-rw-r--r-- 1 120B Nov 27 13:29 Posts.xml.zip.dvc
-rw-r--r-- 1 10M Nov 27 13:30 Posts.xml.zip
$ ls -lh ls -lh .dvc/cache/ce/
$ ls -lh .dvc/cache/files/md5/ce/
-rw-r--r--@ 1 10M Apr 25 2017 68b98d82545628782c66192c96f2d2
```
2 changes: 1 addition & 1 deletion content/docs/start/data-management/data-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ while the original data file was added to `.gitignore`.
look like this:

```
.dvc/cache
.dvc/cache/files/md5
└── 22
Β Β  └── a1a2931c8370d3aeedd7183606fd7f
```
Expand Down
4 changes: 2 additions & 2 deletions content/docs/user-guide/project-structure/dvcignore-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Let's now track the directory with `dvc add`, and see what happens in the
```cli
$ dvc add data
...
$ tree .dvc/cache
.dvc/cache
$ tree .dvc/cache/files/md5
.dvc/cache/files/md5
β”œβ”€β”€ 26
β”‚Β Β  └── ab0db90d72e28ad0ba1e22ee510510
└── ad
Expand Down

0 comments on commit 0aa6b10

Please sign in to comment.