docbrown/app/controllers
Jeremy Friesen 2b3f4e1342
Refactoring cached_followed_tags (#16175)
* Refactoring cached_followed_tags

This refactor consolidates two queries and a loop into a single query.

One thing that is unclear is if we're ever really clearing the cache of
the user by id?

What follows is un-related to the refactor but appears to be related to #14937.

> First, I see we set a cache here:
>
> ebdaaaf15b/app/decorators/user_decorator.rb (L23-L34)
>
> But when I look at what busts the user cache, it doesn’t look like we’re busting it for the above cached location:
>
> ebdaaaf15b/app/services/edge_cache/bust_user.rb (L3-L22)
>
> What if anything am I missing in regards to cache busting?

* Adding some deprecated methods

* Updating documentation

* Bump for travis

* Bump for travis

* Updating comments to fix confusion

NOTE: I might be introducing more confusion, but at least
I'm addressing the prior confusion.

* Bump for travis

* Updating so we don't cache ActiveRecord objects

* Selecting only applicable attributes for caching

* Apply suggestions from code review

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Adjusting code based on feedback

* Bump for travis

* Bump for travis

* Update app/decorators/user_decorator.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

Co-authored-by: Michael Kohl <citizen428@forem.com>
2022-01-24 19:53:48 -05:00
..
admin Let override of ToS and CoC show in onboarding (#16217) 2022-01-20 19:45:39 -05:00
api/v0 app/controllers/api i18n (#16002) 2022-01-11 10:05:54 +07:00
concerns ListingsToolkit refactoring (#16184) 2022-01-21 09:27:10 +07:00
incoming_webhooks Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
notifications
stories Refactor AB Experiments and exercise all variants in rspec (#16236) 2022-01-24 17:03:58 -05:00
users Mobile mention notifications (#15780) 2021-12-16 11:06:54 -06:00
api_secrets_controller.rb Removing Settings::General.email_addresses (#13958) 2021-06-11 12:34:34 +03:00
application_controller.rb Remove Setup Banner (VerifySetupCompleted) (#15969) 2022-01-10 10:30:05 -07:00
application_metal_controller.rb
article_approvals_controller.rb
articles_controller.rb Refactoring to leverage an Article scope (#15850) 2021-12-29 09:25:31 -05:00
async_info_controller.rb Refactoring cached_followed_tags (#16175) 2022-01-24 19:53:48 -05:00
badges_controller.rb
collections_controller.rb Series count to only include non empty series (#16130) 2022-01-18 10:22:34 +07:00
comments_controller.rb Spelling fixes to live code (#15670) 2021-12-06 12:11:25 +02:00
confirmations_controller.rb Redirect to creator settings page where necessary (#15298) 2021-11-11 14:44:49 +02:00
credits_controller.rb Refactor credit purchasing (#13955) 2021-06-15 09:04:51 +07:00
dashboards_controller.rb Series count to only include non empty series (#16130) 2022-01-18 10:22:34 +07:00
deep_links_controller.rb Add exclusion to AASA supported paths (#14593) 2021-08-26 10:17:39 -06:00
devices_controller.rb ForemMobile namespaced functions (#15212) 2021-11-23 15:25:29 -06:00
discussion_locks_controller.rb Update DiscussionLocksController (#14351) 2021-07-27 14:42:14 +02:00
display_ad_events_controller.rb Extracting constants and tidying tests (#15946) 2022-01-05 09:19:39 -05:00
email_authorizations_controller.rb
email_subscriptions_controller.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
feedback_messages_controller.rb Remove "connect" feedback message special treatment (#16167) 2022-01-19 08:32:10 -06:00
followings_controller.rb
follows_controller.rb Bug Fix: Following an organization from article's sidebar creates an incorrect follow record (#15093) 2021-11-05 12:40:20 -04:00
ga_events_controller.rb Skip google analytics when ga_tracking_id is nil (#15967) 2022-01-06 12:21:07 -05:00
github_repos_controller.rb Spelling (#15702) 2021-12-07 06:59:10 -07:00
html_variant_successes_controller.rb
html_variant_trials_controller.rb
image_uploads_controller.rb
invitations_controller.rb
liquid_embeds_controller.rb Move work from template to controller (#16092) 2022-01-18 11:21:25 -05:00
liquid_tags_controller.rb Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
listings_controller.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
moderations_controller.rb Refactoring questions asked of user (#15762) 2021-12-21 12:45:12 -05:00
notification_subscriptions_controller.rb Rename unidiomatic methods (#13328) 2021-04-09 10:59:56 -05:00
notifications_controller.rb Refactoring to add helper method (#16064) 2022-01-12 11:21:44 -05:00
omniauth_callbacks_controller.rb Guarding against spam from OAuth Sources (#15404) 2021-11-18 16:26:39 -05:00
onboardings_controller.rb
open_search_controller.rb
organizations_controller.rb Use constants for Permitted params in controller (#14895) 2021-10-05 09:00:14 -04:00
page_views_controller.rb Ensuring we don't track views of author or unpublished (#16143) 2022-01-18 11:23:18 -05:00
pages_controller.rb RFC #74, Pt. 2: Private Forem Landing Page (#13819) 2021-06-10 11:46:24 -06:00
passwords_controller.rb Add a notification on password reset (#14968) 2021-10-07 14:48:01 -04:00
podcast_episodes_controller.rb Fix and clean up podcast pages (#15004) 2021-10-15 17:38:57 -04:00
podcasts_controller.rb Use constants for Permitted params in controller (#14895) 2021-10-05 09:00:14 -04:00
poll_skips_controller.rb Use constants for Permitted params in controller (#14895) 2021-10-05 09:00:14 -04:00
poll_votes_controller.rb Use constants for Permitted params in controller (#14895) 2021-10-05 09:00:14 -04:00
pro_accounts_controller.rb
profile_field_groups_controller.rb
profile_pins_controller.rb Favor destroy_by over where.first&.destroy (#15868) 2021-12-22 23:55:52 -05:00
profile_preview_cards_controller.rb Add JSON representation of Profile Preview Card info (#14296) 2021-07-21 16:23:54 +01:00
profiles_controller.rb Profile generalization: cleanup (#12947) 2021-08-20 16:36:02 +02:00
rating_votes_controller.rb
reactions_controller.rb Don't try to create invalid RatingVote (#14706) 2021-09-14 09:41:59 +07:00
reading_list_items_controller.rb
registrations_controller.rb Adding ability to block domains from registration (#15397) 2021-11-16 18:56:01 -05:00
response_templates_controller.rb
search_controller.rb Spelling (#15702) 2021-12-07 06:59:10 -07:00
service_worker_controller.rb Revert "Revert "Removed service worker (#12974)" (#13014)" (#13015) 2021-03-17 10:57:56 -04:00
sidebars_controller.rb Refactoring to consolidate logic (#15851) 2021-12-29 11:08:04 -05:00
sitemaps_controller.rb Spelling (#15702) 2021-12-07 06:59:10 -07:00
social_previews_controller.rb
stories_controller.rb Refactoring to add helper method (#16064) 2022-01-12 11:21:44 -05:00
stripe_active_cards_controller.rb Use constants for Permitted params in controller (#14895) 2021-10-05 09:00:14 -04:00
tag_adjustments_controller.rb
tags_controller.rb Tidying up and documenting Tag model (#15949) 2022-01-07 09:14:31 -05:00
user_blocks_controller.rb ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
user_subscriptions_controller.rb
users_controller.rb Onboarding "improvements" (#16210) 2022-01-21 10:58:05 -06:00
video_states_controller.rb Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
videos_controller.rb