src/Multisites.php
public function init()
    {
        $valid = null;

        if ($this->cache->has(self::CACHE_KEY)) {
            $cached = $this->cache->get(self::CACHE_KEY);
            $valid  = $cached && isset($cached['hosts']) && count($cached['hosts']);
        }


        if ($valid) {
            $this->map = $cached;
        } else {
            $this->build();
        }
    }
public function init()
    {
        $valid = null;

        if ($this->cache->has(self::CACHE_KEY)) {
            $cached = $this->cache->get(self::CACHE_KEY);
            $valid  = $cached && isset($cached['hosts']) && count($cached['hosts']);
        }


        if ($valid) {
            $this->map = $cached;
        } else {
            $this->build();
        }
    }
public function init ( ) { $ valid = null ; if ( $ this -> cache -> has ( self :: CACHE_KEY ) ) { $ cached = $ this -> cache -> get ( self :: CACHE_KEY ) ; $ valid = $ cached && isset ( $ cached [ 'hosts' ] ) && count ( $ cached [ 'hosts' ] ) ; } if ( $ valid ) { $ this -> map = $ cached ; } else { $ this -> build ( ) ; } }
Attempts to load the hostname map from the cache, and rebuilds it if
it cannot be loaded.
Attempts to load the hostname map from the cache and rebuilds it if it cannot be loaded .