Page MenuHomePhabricator

Change api cache ttl to be an .env var
Closed, ResolvedPublic3 Estimated Story Points

Description

Cache TTL is hardcoded in src/Util/Api.php.

Reason for this change:

  • We were having production issues where the VPS was running out of disk space and there was no easy way to change this setting
  • Is a good practice to have this kind of values as part of the config or environment for easy tweaking

Acceptance criteria

  • Move ttl value to an .env variable so it can be easily adjustable

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptFeb 25 2021, 6:52 AM
ARamirez_WMF set the point value for this task to 3.Feb 25 2021, 6:08 PM

The default cache time is now 6 hours, and I've updated the pruning cronjob to also run at 6 hour intervals.

I don't think there's anything much to QA here.

Xover renamed this task from Change api cache ttl to be an .evn var to Change api cache ttl to be an .env var.Feb 26 2021, 10:34 AM

The default cache time is now 6 hours, and I've updated the pruning cronjob to also run at 6 hour intervals.

I don't think there's anything much to QA here.

I agree. As of now (and for posterity), disk utilization is at ~16% (5.3G). I'll keep an eye on the reports and we'll tweak if necessary.

dom_walden added a subscriber: dom_walden.

The default cache time is now 6 hours, and I've updated the pruning cronjob to also run at 6 hour intervals.

I don't think there's anything much to QA here.

I agree. As of now (and for posterity), disk utilization is at ~16% (5.3G). I'll keep an eye on the reports and we'll tweak if necessary.

Thanks. I will move this along then as there is nothing for me to do.

ifried added a subscriber: ifried.

Nothing user-facing to test here. I'm marking this as Done.