public function getMeter($meterIdentifier)
    {
        // create cache key
        $item_key = $this->getCacheKey($meterIdentifier);

        // if not cached, go get it
        if (!($meter = $this->cacheService->retrieve($item_key))) {
            try {
                // find specific meter for company and login
                $meter = $this->meterStorage->getMeter($meterIdentifier);
            } catch (\Exception $e) {
                $meter = array();
            }

            // cache meter
            $this->cacheService->store($item_key, $meter, $this->cacheExpires);
        }

        return $meter;
    }
public function getMeter($meterIdentifier)
    {
        // create cache key
        $item_key = $this->getCacheKey($meterIdentifier);

        // if not cached, go get it
        if (!($meter = $this->cacheService->retrieve($item_key))) {
            try {
                // find specific meter for company and login
                $meter = $this->meterStorage->getMeter($meterIdentifier);
            } catch (\Exception $e) {
                $meter = array();
            }

            // cache meter
            $this->cacheService->store($item_key, $meter, $this->cacheExpires);
        }

        return $meter;
    }
public function getMeter ( $ meterIdentifier ) { // create cache key $ item_key = $ this -> getCacheKey ( $ meterIdentifier ) ; // if not cached, go get it if ( ! ( $ meter = $ this -> cacheService -> retrieve ( $ item_key ) ) ) { try { // find specific meter for company and login $ meter = $ this -> meterStorage -> getMeter ( $ meterIdentifier ) ; } catch ( \ Exception $ e ) { $ meter = array ( ) ; } // cache meter $ this -> cacheService -> store ( $ item_key , $ meter , $ this -> cacheExpires ) ; } return $ meter ; }
Gets the pulsar meter from cache or db
Gets the pulsar meter from cache or db