# Etag field in oc\_filecache table, what it means?

**URL:** <https://help.nextcloud.com/t/etag-field-in-oc-filecache-table-what-it-means/217714>\
**Category:** 💻 Development\
**Created:** [February 17, 2025, 3:10pm UTC](https://help.nextcloud.com/t/etag-field-in-oc-filecache-table-what-it-means/217714 "2025-02-17T15:10:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zx81](https://help.nextcloud.com/letter_avatar/zx81/32/6_22734026db12803ebb3e059622ac3534.png) [@zx81](https://help.nextcloud.com/u/zx81)\
**Post date:** [February 17, 2025, 3:10pm UTC](https://help.nextcloud.com/t/etag-field-in-oc-filecache-table-what-it-means/217714/1 "2025-02-17T15:10:26Z")

</div>

Hi

I need to upload files directly to the nc repo, usually after that a files:scan … would add the needed registers to oc\_filecache with the new files uploaded but since occ files:scan is soooooo slow I want to insert the data for the new file directly in oc\_filecache.

I’ve all the fields located and test the function and works ok and fast but I can’t find the meaning of “etag” and I guess that field could be important. How could I get the right value of that field to make a direct insert in the oc\_filecache table?

I know that the preferred method is occ files:scan but --all needs in my case \>14 hours. If I scan only the directory which I’m uploading data it needs only a few seconds but since sometimes I need to upload \>500 files at same time to different directories it can be \>1 hour.

Thks

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [February 17, 2025, 4:41pm UTC](https://help.nextcloud.com/t/etag-field-in-oc-filecache-table-what-it-means/217714/2 "2025-02-17T16:41:45Z")

</div>

Please don’t mangle with the database. Besides the fact you could easily brake your system this method is fragile - if there is change on the DB schema you have to adjust the script…

You could try different upload methods e.g. adding the file with #curl or using WebDAV - both are official and supported methods. for occ - as long you add multiple files to the same directory you can ran occ once per directory which could improve the speed as well.

---

<div class="post-metadata">

**Author:** ![zx81](https://help.nextcloud.com/letter_avatar/zx81/32/6_22734026db12803ebb3e059622ac3534.png) [@zx81](https://help.nextcloud.com/u/zx81)\
**Post date:** [February 19, 2025, 5:39pm UTC](https://help.nextcloud.com/t/etag-field-in-oc-filecache-table-what-it-means/217714/3 "2025-02-19T17:39:50Z")

</div>

I know the risks and your’re right that should be better to use a “traditional” method.

cURL was fine but I have an absurd problem, no way to upload or create directories using MKCOL it they have a comma in the name. I’ve tried to replace the comma with %2C, no success.

Do you know how to send a MKCOL to create for example “my,directory”?

---

<div class="post-metadata">

**Author:** ![zx81](https://help.nextcloud.com/letter_avatar/zx81/32/6_22734026db12803ebb3e059622ac3534.png) [@zx81](https://help.nextcloud.com/u/zx81)\
**Post date:** [February 19, 2025, 7:12pm UTC](https://help.nextcloud.com/t/etag-field-in-oc-filecache-table-what-it-means/217714/4 "2025-02-19T19:12:27Z")

</div>

Is strange because I though that the problem were the comma in the name, but if I retry it a few times, the command works.

It only occurs with the names with comma (error 405), anyway it seems that with an app password the speed is very reasonable.

Thanks
