Every option to ledger may be set using an environment variable. If an option has a long name such --this-option, setting the environment variable LEDGER_THIS_OPTION will have the same affect as specifying that option on the command-line. Options on the command-line always take precedence over environment variable settings, however.
Note that you may also permanently specify option values by placing option settings in the file ~/.ledgerrc, for example:
--cache /tmp/.mycache --pager /usr/bin/less