Lago events ingested but events_count stays 0 in current usage API

Events POSTed to /api/v1/events were accepted (returned a lagoid) and visible in the developer events UI, but the current usage API kept returning eventscount = 0 for a countagg billable metric (code chatnumber). Another user hit the same thing. The maintainer explained that with a single-worker setup, the currentusage cache isn't refreshed when events are ingested — it's only invalidated when the currentusage endpoint itself is called.

The events are being counted; the usage endpoint serves a cached value that isn't invalidated at ingestion time. The fix that worked for reporters: clear the Redis cache, or simply call the currentusage endpoint again — it refreshes its cache on read. Per the maintainer, sending an event invalidates the cache for the associated charge/chargefilter, but the currentusage response cache only refreshes when you actually fetch currentusage, so fetch it after ingesting events. Source: https://github.com/getlago/lago/issues/538