-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Impressionist counter_cache not working #1196
Labels
Comments
jywarren
added a commit
to jywarren/plots2
that referenced
this issue
Jan 19, 2017
jywarren
added a commit
that referenced
this issue
Jan 20, 2017
* counter fixes * more totalcount excising * completed count > views changes, I believe * schema changes * db schema tweak * schema example tweak * more controller changes * controller changes for impressionable * inconsistent test resolution * test addition for inconsistencies * test tweaks * test tweak * test fix * additional * fixed!? * testing node.views incrementing in controllers with impressionist gem * attempt to clear impressions to test unique ips * further attempts * workaround for node.views counter_cache, see #1196 * Timecop test fixes * changes for wiki tests as well * clear uniques before wiki test * test fixes via new integration test
@jywarren , Is this issue fixed ? If not, can i pick it up ? |
It is not fixed yet -- yes, that'd be great. Tell me if you need help diving in! |
@imsarath Are you currently working on this? |
This was referenced Mar 23, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened just before the problem occurred
We've installed the impressionist gem and are successfully counting unique impressions on pages now. But the "counter cache" setup (which would keep a column on the
node
table updated with a calculated tally of views) is not working, though that's in the code:https://github.com/publiclab/plots2/blob/master/app/models/node.rb#L181
We've temporarily based
node.totalcount
on the sum ofnode.legacy_views + node.impressions_count
:https://github.com/publiclab/plots2/blob/master/app/models/node.rb#L183-L187
However, if we can get this line of the tests passing, we can re-institute the cached value, which will improve performance for node page views (notes and wikis):
https://github.com/publiclab/plots2/blob/master/test/functional/notes_controller_test.rb#L74
The text was updated successfully, but these errors were encountered: