Consistent pattern for document paths?


#1

Matrix Version: 5.3.4.2

Hi,

When Matrix makes a document live it changes the location to an /__data location (e.g. /__data/assets/word_doc/0024/655062/ohsat-tool.doc). Is there a consistent pattern as to where the document is located in Matrix and where it is in the /__data location when the document goes live?

e.g. This document in Matrix has a webpath of http://www.test.com/somefolder/docs/ohsat-tool.doc and when it goes live it becomes http://www.test.com/__data/assets/word_doc/0024/655062/ohsat-tool.doc

The reason I ask this is because with our internal search engine we can create search boxes which isolate results to a specific path (e.g. we can have it so that it only show results from documents in /somefolder/docs/). If the __data path is consistent and Matrix can guarantee that everything that has a path of /0024/655062/ corresponds to /somefolder/docs/ then that should be fine however if that is not the case then how do you get around this?


(Marcus Fong) #2

No, the location of the asset in the Matrix asset tree has no relation to its __data URL - that’s calculated from the asset ID only.

If you need tight control over your file URLs, then you’ll need to turn “Allow Unrestricted Access” off on your File assets:

https://matrix.squiz.net/manuals/core-assets/chapters/file#details

There will be a performance impact, but if you have effective proxy caching in front of Matrix the impact is usually fairly minimal.


#3

Hi Marcus,

Can you elaborate on proxy caching in front of the Matrix? What do you propose for that?


(Marcus Fong) #4

By “proxy caching” I mean a caching reverse proxy to improve website performance.

There are various options for this, including Squid, Varnish and (for Matrix installs hosted with Squiz) our own Squiz Edge global CDN, but I can’t propose anything to you sight unseen.

If you’re a Squiz client, then the best thing would probably be to discuss it with your account manager. If not, then perhaps discuss it with your IT team.