Nginx: how works levels in proxy_cache_path ?

Every configuration examples I’ve found was mentioning levels=1:2 without explaining clear what means 1 and 2.

So 1:2 means depth 1 with 1 character followed by depth 2 with 2 characters. Example:

1:2   -> /5/ba/
1:1:2 -> /f/c/0b/
2:2:2 -> /f0/ba/c4/

Thanks that Chinese guy here: https://www.zybuluo.com/phper/note/90310

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>