cells icon indicating copy to clipboard operation
cells copied to clipboard

Add method Cell#cached?

Open PikachuEXE opened this issue 7 years ago • 15 comments

This is for logging cache hit rate for specific cells Looking at caching server hit rate is useless and also inaccurate since rails 5.2's cache versioning

PikachuEXE avatar Dec 05 '18 08:12 PikachuEXE

Spec fixed

PikachuEXE avatar Dec 06 '18 02:12 PikachuEXE

Hello any more change required?

PikachuEXE avatar Jan 24 '19 07:01 PikachuEXE

LOL almost forgot about this PR Can this be merged?

PikachuEXE avatar Jun 06 '19 06:06 PikachuEXE

Yo?

PikachuEXE avatar Jun 14 '19 01:06 PikachuEXE

Hello?

PikachuEXE avatar Jun 21 '19 02:06 PikachuEXE

@seuros :) ? It's been sitting here approved for over 7 months I think this boy deserves some attention 👋

PikachuEXE avatar Jul 19 '19 06:07 PikachuEXE

Do you have any example on where this method is used in your apps? :beers:

apotonick avatar Jul 19 '19 07:07 apotonick

I mainly use this method for

  • Tracking (whether transactions are having main page content cell cached)
  • Page content "warming" (Keep important page content cells cached by running in bg workers)

PikachuEXE avatar Jul 19 '19 09:07 PikachuEXE

Build failed in 2.2 due to image

No test case is failing

PikachuEXE avatar Jul 19 '19 09:07 PikachuEXE

Build for ruby 2.2 fixed But I guess that change should be applied on master instead

PikachuEXE avatar Jul 22 '19 01:07 PikachuEXE

Anything else I should respond to or update?

PikachuEXE avatar Jul 24 '19 03:07 PikachuEXE

Hello again :3 ?

PikachuEXE avatar Aug 09 '19 01:08 PikachuEXE

Thanks @PikachuEXE for your contributions! :heart: We are still mulling over the decision whether or not this addition is really needed in the core code. It's a helpful method, but every method added is a method you need to maintain, test, and deprecate at some point. The more public API an object has, the worse it gets (see ActiveRecord for reference).

One idea I have is we could have a cells-cached gem and still merge your internal refactorings in cells core. With the download statistics we can then analyze how much this addition is being used - I am guessing, it won't be used a lot (#nojudging ;).

I apologize if that feels "unfair" but I'm planning a very slim Cells 5 and the more we add now, the more we have to deprecate, and in all fairness, there are more pressing issues than a caching tester, so please bear with me and think about my suggestions again.

apotonick avatar Aug 09 '19 04:08 apotonick

I am totally fine with having an extension gem instead of merging it into core. Tell me what I can/should do ;)

PikachuEXE avatar Aug 09 '19 06:08 PikachuEXE

Also to let people know about your plan of releasing slim gem(s) You might want to consider putting a PULL_REQUEST_TEMPLATE to let other guys know when they submit PR.

PikachuEXE avatar Aug 09 '19 06:08 PikachuEXE