in reply to Re^2: Where to save module data
in thread Where to save module data
CHI does look like the way to go. But its File driver defaults to /tmp/chi-driver-file (or OS equivalent), and it sounds to me like your data would more appropriately be in /var/cache/your-module-name.
Filesystem Hierarchy Standard:/var/cache is intended for cached data from applications. Such data is locally generated as a result of time-consuming I/O or calculation. The application must be able to regenerate or restore the data. Unlike /var/spool, the cached files can be deleted without data loss. The data must remain valid between invocations of the application and rebooting the system. Files located under /var/cache may be expired in an application specific manner, by the system administrator, or both. The application must always be able to recover from manual deletion of these files (generally because of a disk space shortage). No other requirements are made on the data format of the cache directories.You'd want to specify a location for Windows, too. A little googling didn't find any close equivalent to /var/cache for non-FHS systems, so if /var/cache doesn't exist, you'd likely just want to use something under File::Spec->tmpdir or let CHI default.
|
|---|