Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/collections/user-usage

lib/collections/user-usage

Defines the Payload CMS collection for User Usage tracking.

This collection stores usage counters separate from user authentication data to avoid side effects with sessions and reduce overhead of usage tracking. One-to-one relationship with users collection.

Background: When usage counters were embedded in the users collection and versioning was enabled, calling payload.update() on user documents would trigger session clearing due to PostgreSQL cascade constraints on the users_sessions table. Separating usage tracking into its own collection eliminates this risk entirely.

Variables

default

const default: CollectionConfig

Last updated on