Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing caching for getRootId() to save queries #2789

Closed
wants to merge 7 commits into from

Conversation

@Hackwar
Copy link
Member

@Hackwar Hackwar commented Jan 14, 2014

The method getRootId() is executed numerous times per page load, for example when editing an article around 20 times. At the same time, that method always returns the same value. By adding a static variable as cache, we save us all those duplicate queries and they are only run once per table.

@Hackwar
Copy link
Member Author

@Hackwar Hackwar commented Feb 24, 2014

@wilsonge
Copy link
Contributor

@wilsonge wilsonge commented Feb 26, 2014

@test works (this is like the 3rd/4th attempt to fix this - except this actually works) so much awesomeness - thanks Hannes.

* Cache for the root ID
*
* @var integer
* @since 14.1

This comment has been minimized.

@wilsonge

wilsonge Mar 11, 2014
Contributor

Can we mark with as since CMS 3.3 rather than 14.1 please :)

@mbabker
Copy link
Contributor

@mbabker mbabker commented Apr 8, 2014

Merged to 3.3-dev at ce8f7ec

@mbabker mbabker closed this Apr 8, 2014
Bakual added a commit to Bakual/joomla-cms that referenced this pull request May 12, 2014
@Hackwar Hackwar deleted the Hackwar:accesscache branch Dec 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants