Skip to content

Should unmatched cache() return null? #1870

Description

@MGatner

The cache Service accessory for the Caching Library is incredibly helpful and makes for seamless data sourcing among session, input, etc. However, that it doesn't mimic the other wrappers in returning "null" makes for cumbersome extra checks.
I wonder if there was an explicit reason for cache to return "false" (making it impossible to cache anything to 'false')? And if not would that be okay to change?
Ref: https://codeigniter4.github.io/CodeIgniter4/general/common_functions.html#cache

EDIT: wording

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions