Marking Directories

Navigation:  Deprecated > OptimumCache >

Marking Directories

Previous pageReturn to chapter overviewNext page

NOTE. OPTIMUMCACHE IS NO LONGER SUPPORTED.

 

Marking directories to be cached:

 

# occtl --mark-dir /path/to/site/on/filesystem --recursive

 

In common scenario admin marks for caching user directories:

 

# occtl --mark-dir /home /home2 /home3 --recursive

 

OptimumCache is going to index these directories. Thus system load during this period (from hours to days) might be as twice as high. You can check indexing job status with 'at -l' at any time.

 

Ignoring particular files & directories:

 

OptimumCache tracks files & directories that need to be cached. Once file is modified, it will no longer be tracked by OptimumCache (as there is very little chance that it will have a duplicate). Yet, all new files created in tracked directories are checked for duplicates.

 

Sometimes you might want to ignore such checks for directories where large number of temporary or new files are created, that will not have duplicates - as such checks are expensive. Directories like mail queue, and tmp directories should be ignored.

 

You can set a regexp mask for directories that you would like to ignore using:

 

$ occtl --add-skip-mask REGEX

 

To list skip masks:

 

$ occtl --list-skip-mask

 

To remove skip mask:

 

$ occtl --remove-skip-mask ID|Tag

 

At the very end, for those changes to take effect:

 

$ occtl --check

 

‘occtl --check’ is the same lengthy operation as ‘marking’ is. Thus, it’s usage has to be sane, especially for big ‘home’ (>500G).

 

By default, OptimumCache sets up following skip masks:

 

id

tag

regex

-----

------------------

---------------

1

all_dot_files

/\...*

2

cagefs

^/home/cagefs-skeleton$

3

cagefs

^/home/cagefs-skeleton/

4

cpanel

^/home[^/]*/cPanelInstall

5

cpanel

^/home[^/]*/cpeasyapache

6

cpanel

^/home[^/]*/aquota

7

cpanel

^/home[^/]*/jailshell

8

cpanel

^/home[^/]*/[^/]+/mail$

9

cpanel

^/home[^/]*/[^/]+/mail/.*

10

cpanel

^/home[^/]*/[^/]+/logs$

11

cpanel

^/home[^/]*/[^/]+/logs/.*

12

cpanel

^/home[^/]*/[^/]+/\.cpanel$

13

cpanel

^/home[^/]*/[^/]+/\.cpanel/.*

14

cpanel

^/home[^/]*/[^/]+/\.cagefs

15

cpanel

^/home[^/]*/[^/]+/\.cagefs/.*

16

cpanel

^/home[^/]*/virtfs

17

cpanel

^/home[^/]*/virtfs/.*

18

not_a_userdir

^/home/tmp/

19

not_a_userdir

^/home/tmp$

20

not_a_userdir

^/home/ftp/

21

not_a_userdir

^/home/ftp$

22

not_a_userdir

^/home/admin/

23

not_a_userdir

^/home/admin$

24

quota

^/home[^/]*/quota.user$

25

usermisc

/quota.user$

26

users_home

^/home/[^/]+/backups$

27

users_home

^/home/[^/]+/backups/

28

users_home

^/home/[^/]+/imap$

29

users_home

^/home/[^/]+/imap/

30

users_home

^/home/[^/]+/Maildir$

31

users_home

^/home/[^/]+/Maildir/

32

users_home

^/home/[^/]+/domains/[^/]+/logs$

33

users_home

^/home/[^/]+/domains/[^/]+/logs/

34

users_home

^/home/[^/]+/domains/[^/]+/public_ftp$

35

users_home

^/home/[^/]+/domains/[^/]+/public_ftp/

36

users_home

^/home/[^/]+/domains/[^/]+/stats$

37

users_home

^/home/[^/]+/domains/[^/]+/stats/

 

This information is stored in /etc/container/optimumcache/ignore.d/

 

Skip Mask syntax

 

Skip masks use following regexp syntax: http://www.greenend.org.uk/rjk/tech/regexp.html

 

For example, to disable caching all directories that contain */cache/*, you should use skip masks like:

/cache/

/cache$

 

This information is stored in /etc/container/optimumcache/ignore.d/