inpsyde / WP-Stash

Bridge between WordPress and StashPHP, providing a PSR6-compliant caching system for WordPress
https://inpsyde.com/en/wordpress-caching-system-wpstash/
GNU General Public License v2.0
51 stars 13 forks source link

WPStash - Configuration via env var #9

Closed Chrico closed 5 years ago

Chrico commented 5 years ago

Currently WPStash is listening in Inpsyde\WpStash\Config only to constants via defined(). In some scenarios this might not match because the configration happens via env vars. therefore there should be first of all a check in Inpsyde\WpStash::fromConfig() if the var is either defined or via getenv available and depending on that the config generated and also there's a duplication for generating the Config in Inpsyde\WpStash::fromConfig() and `Inpsyde\WpStash::getDriver().

Biont commented 5 years ago

Implemented by #10