Skip to content
Snippets Groups Projects
  • Vladimír Čunát's avatar
    b1a16801
    lua cache bindings: error out if cache isn't open yet · b1a16801
    Vladimír Čunát authored
    The catch is that during configuration file processing,
    no cache is open (yet), as kresd can't know if the config
    does open it in some later part (with non-default path or size).
    Now we just throw an error.  Exceptions:
     - cache.open() and cache.backends(), of course :-)
     - cache.ns_tout() - not required, it's not really inside cache
     - cache.close() - it sounds reasonable to allow "closing a closed cache"
    
    This immediately caught a typo in cache metatable.
    Verified
    b1a16801
    History
    lua cache bindings: error out if cache isn't open yet
    Vladimír Čunát authored
    The catch is that during configuration file processing,
    no cache is open (yet), as kresd can't know if the config
    does open it in some later part (with non-default path or size).
    Now we just throw an error.  Exceptions:
     - cache.open() and cache.backends(), of course :-)
     - cache.ns_tout() - not required, it's not really inside cache
     - cache.close() - it sounds reasonable to allow "closing a closed cache"
    
    This immediately caught a typo in cache metatable.
To find the state of this project's repository at the time of any of these versions, check out the tags.