AdvancedCustomFields / AdvancedCustomFields/acf
Ability to disable or flush and replenish ACF store
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
We use a queue system that runs for a long time processing tasks via WP CLI. Some of those tasks fetch posts and ACF fields. As it's running under a single PHP process, once ACF populates the $acf_stores global on first run, any new queries will return only stale data as the process is still in memory.
Clearing the store, or field data etc has no way to automatically replenish the store in real time, and results in missing data, e.g. acf_get_store('fields')->reset();
Unless I missed something, there doesn't seem to be a way to clear the store once it's populated and having it auto replenish with fresh data later during run time.
Would one of these features (or a better idea if you have one) be possible in a future release:
- Give us a filter or some ability to not use the store at all.
- Add some kind of fallback check to automatically replenish the store if data is missing, so it can be cleared at any time during a process without causing errors
Thanks for the great plugin.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with acf_get_store('fields') and the $acf_stores global in a long-running WP CLI process, then reproduce the stale-data behavior described after the first query. The issue does not name files or tests; done would be a clearly defined supported way to disable, flush, or replenish the store without missing data during later queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100