Message-ID: <291437489.2824.1485850913215.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2823_309188728.1485850913215" ------=_Part_2823_309188728.1485850913215 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This page describes commands involved in clearing cache from the command= line.
Out of the box Symfony provides a command to perform cache clearing. It = will delete all file-based caches, which mainly consist of Twig template, S= ymfony container, and Symfony route cache, but also everything else stored = in cache folder. Out of the box on a single-server setup this includes "Con= tent cache". For further information on use, see the help text of the = command:
php app/console --env=3Dprod cache:clear -h=20
If you do not specify an environment, by default cache:clear<=
/code> will clear the cache for the
dev
environment. If you wa=
nt to clear it for prod
you need to to use the --env=3Dpr=
od option.
On each web server
In Clustering setup (s= everal web servers), the command to clear file cache needs to be execu= ted on each and every web server!
For Cluster setup, the con= tent cache ( HTTP Cache = span> and Persistent Cache) must be set up to be shared among the = servers. And while all relevant cache is cleared for you on repository chan= ges when using the APIs, there might be times where you'll need to clear ca= che manually:
When running eZ Platform in the dev
environment you have ac=
cess to the standard Symfony Web Debug Toolbar. It is extended with some eZ=
Platform-specific information:
This section provides the number of non-cached SPI calls and handlers. You can se= e details of these calls in the Symfony Profiler= page.
Here you can see the name of the current Siteaccess and how it was match= ed. For reference see the list of possible siteaccess matchers.
Logging in eZ Platform consists of two parts, several debug systems that= integrates with symfony developer toolbar to give you detailed information= about what is going on. And standard PSR-3 logger, as provided by S= ymfony using Monolog.
When using the Symfony dev = environment , the system out of = the box tracks additional metrics for you to be able to debug issues, = this includes Stash cache use (done by StashBundle), and a persistence cache= a> use.
For long running scripts, instead head over to= Executing long-running console commands for some much more relevant i= nfo.
If you are running out of memory and don't need to keep track of cache h=
its and misses. Then StashBundle tracking, represented by the st=
ash.tracking
setting, and persistence cache logging, represente=
d by the setting parameters.ezpublish.spi.persistence.cache.persisten=
ceLogger.enableCallLogging
, can optionally be disabled.
stash: tracking: false # Default is true in dev tracking_values: false # Default is false in dev, to only tra= ck cache keys not values caches: default: inMemory: false # Default is true registerDoctrineAdapter: false parameters: ezpublish.spi.persistence.cache.persistenceLogger.enableCallLogging: fa= lse=20
eZ Platform uses the Monolog component to log errors, and it has a RotatingFileHandler
that allows for file rotation.
According to their documentation, it "logs records to a file and creates=
one logfile per day. It will also delete files older than $maxFiles<=
/code>".
But then, their own recommendation is to use "logrotate
" in=
stead of doing the rotation in the handler as you would have better perform=
ance.
If you decided to use Monolog's handler, it can be configured in a=
pp/config/config.yml
monolog: handlers: main: type: rotating_file max_files: 10 path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug=20