Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
apc_compile_file example
$tmpFile
=
tempnam
(
$dir
,
basename
(
$key
)
)
;
if
(
false !== @
file_put_contents
(
$tmpFile
,
$content
)
&& @
rename
(
$tmpFile
,
$key
)
)
{
@
chmod
(
$key
, 0666 & ~
umask
(
)
)
;
if
(
self::FORCE_BYTECODE_INVALIDATION
==
(
$this
->options & self::FORCE_BYTECODE_INVALIDATION
)
)
{
// Compile cached file into bytecode cache
if
(
\
function_exists
(
'opcache_invalidate'
)
&&
filter_var
(
ini_get
(
'opcache.enable'
)
, \FILTER_VALIDATE_BOOLEAN
)
)
{
@
opcache_invalidate
(
$key
, true
)
;
}
elseif
(
\
function_exists
(
'apc_compile_file'
)
)
{
apc_compile_file
(
$key
)
;
}
}
return
;
}
throw
new
\
RuntimeException
(
sprintf
(
'Failed to write cache file "%s".',
$key
)
)
;
}
public
function
getTimestamp
(
string
$key
)
: int
{