Skip to content

Conversation

@markinigor
Copy link
Contributor

@markinigor markinigor commented Mar 18, 2025

🔍 What was changed

Added a dedicated clearCache() method to the Driver class and replaced existing direct cache clearing (setting $this->queryCache = []) with calls to this method. Also fixed a namespace prefix for the json_validate() function.

🤔 Why?

These changes improve code maintainability by:

  1. Centralizing cache clearing logic into a single method
  2. Making cache clearing implementation consistent across the codebase
  3. Ensuring proper namespace resolution for PHP functions

📝 Checklist

  • Closes #
  • How was this tested:
    • Tested manually
    • Unit tests added

📃 Documentation

No documentation updates needed as this is an internal implementation change that doesn't affect public API.

@markinigor markinigor requested review from a team as code owners March 18, 2025 11:00
@roxblnfk
Copy link
Member

Looks like we need to update CI actions

@roxblnfk
Copy link
Member

@markinigor hi. Have you considered using withoutCache() method to avoid caching of not needed queries?

@roxblnfk roxblnfk changed the title Add public clearCache method Add public cleanCache method Mar 27, 2025
@roxblnfk roxblnfk changed the title Add public cleanCache method Add public cleaкCache method Mar 27, 2025
@roxblnfk roxblnfk changed the title Add public cleaкCache method Add public clearCache method Mar 27, 2025
@roxblnfk roxblnfk merged commit 629a6eb into cycle:2.x Mar 27, 2025
27 of 29 checks passed
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.

2 participants