modelsCache not working for hasManyToMany #15374
-
Hello! I tried to cache related results using cache option and simply fail. I have modelsCache which is working on model query, getRelated works only with hasMany, not hasManyToMany.
Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
quasipickle
Apr 7, 2021
Replies: 1 comment
-
Looks like many-to-many relationships aren't cached: https://docs.phalcon.io/4.0/en/db-models-cache#related-records The solution 6 years ago was to write your own |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gdluck
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like many-to-many relationships aren't cached: https://docs.phalcon.io/4.0/en/db-models-cache#related-records
The solution 6 years ago was to write your own
getRelated()
: https://forum.phalcon.io/discussion/6208/caching-many-to-many-relation