mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Introduce astcachedir, to be used for temporary bucket files
As described in the issue, /tmp is not a suitable location for a large amount of cached media files, since most distributions make /tmp a RAM-based tmpfs mount with limited capacity. I opted for a location that can be configured separately, as opposed to using a subdirectory of spooldir, given the different storage profile (transient files vs files that might stay there indefinitely). This commit just makes the cache directory configurable, but leaves it at /tmp by default, to ensure backwards compatibility. A future commit that only targets master could change the default location to something more sensible such as /var/tmp/asterisk. At that point, the cachedir could be created and cleaned up during uninstall by the Makefile script. ASTERISK-29143 Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
This commit is contained in:
@@ -327,6 +327,8 @@ const char *ast_str_retrieve_variable(struct ast_str **str, ssize_t maxlen, stru
|
||||
s = ast_str_buffer(*str);
|
||||
} else if (!strcmp(var, "SYSTEMNAME")) {
|
||||
s = ast_config_AST_SYSTEM_NAME;
|
||||
} else if (!strcmp(var, "ASTCACHEDIR")) {
|
||||
s = ast_config_AST_CACHE_DIR;
|
||||
} else if (!strcmp(var, "ASTETCDIR")) {
|
||||
s = ast_config_AST_CONFIG_DIR;
|
||||
} else if (!strcmp(var, "ASTMODDIR")) {
|
||||
|
Reference in New Issue
Block a user