Skip Navigation
Is preloading/caching data before the actual method call an (anti)pattern?
  • I work with a code base that is perhaps going through a similar transition. Performance hasn't really been a consideration and so when new functionality is tacked on we're frequently making a new API call even though we might already have the data somewhere else.

    I don't have a name for the pattern or anti-pattern, but people's responses seem to indicate that it's largely a good thing, the change that you're making. I'm reminded of a Martin Fowler-esque or TDD idea that a function should either retrieve data or process it. However I wasn't able to find a blog post about that with a quick search.

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)DE
    deceitfulsteve @programming.dev
    Posts 0
    Comments 2