<?php
namespace ModulesAbstract\ImportedOrdersFileManager\Model; class DirCached extends Dir { public function hasSubDirs() { $cacheKey = sprintf("%s:%s", __METHOD__, $this->path); $result = \Engine\Cache\General::getInstance('disk')->get($cacheKey); if ($result === NULL) { $result = parent::hasSubDirs(); if ($result) { \Engine\Cache\General::getInstance('disk')->set($cacheKey, $result, 60*60*24*30); } } return $result; } }