Skip to content

Cache first 5 results and then don't hit the AI anymore #4

@mathetos

Description

@mathetos

The idea is that what if 1000's of people hit the TLDR button? That's a lot of repetition in generating what might be generally speaking fairly duplicative results.

So let's store the first 5 results that are returned as post meta per post, then when future readers hit the button again, it'll process but instead of hitting the AI again, we'll output one of the 5 results randomly.

  • Create the storage system for storing the results in post meta as an array for easy reference
  • Optionally add a setting in the Reading settings to choose how many results we should store before we return stored results instead of the AI
  • Ensure stored results are output
  • Ensure the AI is not pinged again after enough results are stored

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions