Skip to content

Persist wp-ai-client metadata cache#1718

Merged
chubes4 merged 1 commit into
mainfrom
fix-wp-ai-client-persistent-cache
May 2, 2026
Merged

Persist wp-ai-client metadata cache#1718
chubes4 merged 1 commit into
mainfrom
fix-wp-ai-client-persistent-cache

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 2, 2026

Summary

  • Install a WordPress transient-backed PSR-16 cache into wp-ai-client when no cache has already been configured.
  • Ensure Data Machine installs the cache before provider metadata/model lookup paths used by requests, provider admin, and image generation.
  • Add a standalone smoke test for TTL expiry, false values, namespace clearing, and preserving an existing wp-ai-client cache.

Fixes #1717.
Related upstream issue: WordPress/php-ai-client#230.
Related upstream PR: WordPress/php-ai-client#231.

Testing

  • php tests/wp-ai-client-persistent-cache-smoke.php
  • php -l inc/Engine/AI/WpAiClientCache.php
  • php -l inc/Engine/AI/RequestBuilder.php
  • php -l inc/Engine/AI/WpAiClientProviderAdmin.php
  • php -l inc/Abilities/Media/ImageGenerationAbilities.php
  • php -l inc/bootstrap.php

Notes

  • vendor/bin/phpcs is not available in this worktree.
  • homeboy lint currently reports the repository's existing PHPStan baseline; the new smoke-test findings from this branch were fixed before opening this PR.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Investigating the wp-ai-client metadata timeout path, drafting the cache integration and smoke test, and running local verification. Chris remains responsible for reviewing and shipping the change.

@chubes4 chubes4 merged commit 182796b into main May 2, 2026
2 of 3 checks passed
@chubes4 chubes4 deleted the fix-wp-ai-client-persistent-cache branch May 2, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure persistent wp-ai-client cache for pipeline/job requests

1 participant