Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getShopwareProxyCacheInfo example
/** * Cache info action */
public
function
getInfoAction
(
)
{
$data
=
[
$this
->cacheManager->
getConfigCacheInfo
(
)
,
$this
->cacheManager->
getHttpCacheInfo
(
$this
->
Request
(
)
)
,
$this
->cacheManager->
getTemplateCacheInfo
(
)
,
$this
->cacheManager->
getThemeCacheInfo
(
)
,
$this
->cacheManager->
getShopwareProxyCacheInfo
(
)
,
$this
->cacheManager->
getDoctrineProxyCacheInfo
(
)
,
$this
->cacheManager->
getOpCacheCacheInfo
(
)
,
]
;
$this
->
View
(
)
->
assign
(
[
'success' => true,
'data' =>
$data
,
'total' => \
count
(
$data
)
,
]
)
;
}
switch
(
$cache
)
{
case
'http':
$cacheInfo
=
$this
->cacheManager->
getHttpCacheInfo
(
)
;
break
;
case
'config':
$cacheInfo
=
$this
->cacheManager->
getConfigCacheInfo
(
)
;
break
;
case
'template':
$cacheInfo
=
$this
->cacheManager->
getTemplateCacheInfo
(
)
;
break
;
case
'proxy':
$cacheInfo
=
$this
->cacheManager->
getShopwareProxyCacheInfo
(
)
;
break
;
case
'doctrine-proxy':
$cacheInfo
=
$this
->cacheManager->
getDoctrineProxyCacheInfo
(
)
;
break
;
case
'opcache':
$cacheInfo
=
$this
->cacheManager->
getOpCacheCacheInfo
(
)
;
break
;
default
:
throw
new
NotFoundException
(
sprintf
(
'Cache "%s" is not a valid cache id.',
$cache
)
)
;
}