Skip to content

Provide global switch #9

Description

@deanc

There are scenarios where memcache will be unavailable, or you want to disable it for testing purposes. It would be good to have a flag to turn it off globally, but still allow the following code to run:

$items = $app['memcache']->get('saleitems:'.$sale['id'], function() use ($app, $sale) {
    return $app['db']->fetchAll("SELECT * FROM item WHERE sale_id = ?", array($sale['id']));
});

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions