# Matomo.InvalidateArchivedReports: Matomo Matomo tracking actions Matomo.InvalidateArchivedReports: Matomo Matomo tracking actions Force Matomo to re-archive a report instead of serving a cached one. Documentation Marks the archived reports for the given sites/dates as invalid, so the next read of a reporting table (VisitsSummary.VisitsSummaries, Actions.PageUrls, Events.EventsByCategory, and the rest of design chapter 6b) re-computes rather than answers from cache. Needed because Matomo caches 'today' for todayarchivetimetolive seconds (default 150) regardless of hits recorded since - measured 2026-08-26 write-then-read-back against Events.EventsByCategory: an event tracked through RecordHit moments earlier was still absent from an immediate read, present only after this procedure ran first. Requires admin access on every site named.Parameters of Procedure The following parameters can be used to control the behaviour of the procedure `Matomo.InvalidateArchivedReports`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values. Value specification by position is done by listing all values from the first to the last needed value. For example: a `begin package.procedure(value1, value2, value3); end` on a procedure with four parameters will use the default value for the fourth parameter and the specified values for the first three. Value specification by name is done by listing all values that require a value. For example with `begin package.procedure(name1 => value1, name3 => value3); end` on the same procedure will use the default values for the second and fourth parameters and the specified values for the first and third. | Name | Data Type | Required | Default Value | Documentation | |---|:---:|:---:|:---:|---| | `id_sites` | `string` | ☑ | | Site ID, or a comma-separated list of site IDs, to invalidate archived reports for. | | `dates` | `string` | ☑ | | Date, or a comma-separated list of dates (YYYY-MM-DD), to invalidate archived reports for. | | `period` | `string` | ☐ | | Restrict invalidation to one period: day, week, month or year. Every period covering the given dates is invalidated when omitted. | | `segment` | `string` | ☐ | | Restrict invalidation to archives of one segment definition. | | `cascade_down` | `boolean` | ☐ | | Whether invalidating a period also invalidates every shorter period it covers (a year also invalidating its own months, weeks and days). Defaults to false. |