Repository navigation
Using $prefix in Query.php
#114
Replies: 2 comments 1 reply
|
This variable detail definitely should be made better soon. It's pretty confusing. The For Sugar Calendar the Obviously though, this requires hard-coding a change into Berlin because you can't extend 2 classes at once. See #103. Would love ideas on how to make this super easy. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
After noticing
Query::set_prefix()I figured it would be a good idea to define aQuery::$prefixproperty in my class that inherits theQuerybase. However, upon doing so I started seeing unexpected results.After investigating it looks like it's possible to end up with shared cache groups because
Base::apply_prefix()will see the::$prefixproperty and then try to apply that to the empty passed string which comes from the default emptyQuery::$cache_group. Basically you getmy-prefix-for every group name.Explicitly defining the
Query::$cache_groupproperty resolved my issue but I'm wondering if there is a good place to document that both are needed if used, or if the parent class should throw an exception if there is a set prefix with no cache group?All reactions