-
Notifications
You must be signed in to change notification settings - Fork 22
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
Notification count table instead of reading eventlog for new events #26
Comments
That's basically a cache. It does help. All you need is a table to store |
Yes, I have done all this already. I try to post the code next week. Or directly merge it. |
There are two functions resp. tables defined in qa-plugin.php:
In
We add:
resp.
resp.
In the end of
We add:
That's it. In
PS: @pupi1985 I do not like the bracket formating you did in the revised files, the style I am using (gidgreen did too in the end), is much easier to read (bracket on a separate line). Hope you can try this and consider to change. https://softwareengineering.stackexchange.com/q/2715/313824 – @s And also get rid of the one-if-else-no-bracket-style, I always disliked that. :) |
Great. Just go ahead an make the changes. BTW, no need to stick to my coding style. I try to adapt to the repository owner coding style when I push, but feel free to make any change. It is your repo at the end of the day. PS: this is what I use for my projects: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md |
FYI, I am running a quite custom version of the plugin now (even for several websites).
One main difference is that I am tracking all new events in a notification table. So an event is incoming and gets +1 in the notification table. This is for performance since the plugin does only need to check for the notify count in this table. If >0 then display that number in the notification box frontend.
If you are interested, I can try to merge this code into the existing one.
@pupi1985 What do you think? Performance kick needed? :)
The text was updated successfully, but these errors were encountered: