docbrown/app/decorators
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
..
application_decorator.rb Adding a convenience/optimiization method. (#16079) 2022-01-12 16:28:13 -05:00
article_decorator.rb Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
campaign_decorator.rb Introduce domain model for campaigns (#9300) 2020-07-20 09:04:53 -04:00
comment_decorator.rb Update format specifiers in readable_publish_date (#13660) 2021-05-07 08:51:49 +02:00
listing_decorator.rb Move HexComparer to Hex::Comparer service (#12202) 2021-01-12 11:34:30 -05:00
mention_decorator.rb Expand @-mention functionality to posts (#13367) 2021-05-12 07:33:33 -07:00
notification_decorator.rb Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
organization_decorator.rb Move HexComparer to Hex::Comparer service (#12202) 2021-01-12 11:34:30 -05:00
podcast_episode_decorator.rb Update format specifiers in readable_publish_date (#13660) 2021-05-07 08:51:49 +02:00
profile_decorator.rb Fix profile field production display area functionality and remove SiteConfig.dev_to? hacks for better generalization (#12015) 2021-02-11 10:05:06 -05:00
sponsorship_decorator.rb Switch decorators to Rails builtin decorations - take 2 (#6125) [deploy] 2020-02-19 15:30:53 -05:00
user_decorator.rb Refactoring cached_followed_tags (#16175) 2022-01-24 19:53:48 -05:00