Skip to content

Conversation

@WyriHaximus
Copy link
Member

@WyriHaximus WyriHaximus commented Jun 1, 2016

While developing wyrihaximus/react-cache-redis I've noticed that passing your own cache implementation into the resolver is suboptimal compared to the proposed change.

To do:

  • Implement cache adapter injection
  • Tests
  • Documentation

@WyriHaximus
Copy link
Member Author

@cboden @clue please let me know if you 👍 this idea, if so I'll add the tests and documentation

@clue
Copy link
Member

clue commented Jun 1, 2016

I think this makes sense 👍

@WyriHaximus
Copy link
Member Author

I think this makes sense 👍

Cheers! Does the way I've implemented it also makes sense?

@clue
Copy link
Member

clue commented Jun 1, 2016

Does the way I've implemented it also makes sense?

Absolutely! I'm not a huge fan of the given design, but despite a lack of documentation/tests this LGTM 👍

@WyriHaximus
Copy link
Member Author

Absolutely! I'm not a huge fan of the given design, but despite a lack of documentation this LGTM 👍

Cheers, I'll add the tests and documentation soon

@WyriHaximus
Copy link
Member Author

Documentation and test added, also updated the other cache test to ensure default behavior isn't affected

README.md Outdated

### Custom cache adapter

You can also specify a cache that [implements](https://github.com/reactphp/react/wiki/Users#cache-implementations) [`CacheInterface`](https://github.com/reactphp/cache) to handle the record cache instead of the default in memory cache.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can make this a bit more explicit:

By default, the above will use an in memory cache.

You can also specify a custom cache implementing [`CacheInterface`](https://github.com/reactphp/cache) to handle the record cache instead:

[…]

See also the wiki for possible [cache implementations](https://github.com/reactphp/react/wiki/Users#cache-implementations).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@clue
Copy link
Member

clue commented Jun 4, 2016

LGTM 👍

@WyriHaximus
Copy link
Member Author

Great! :shipit:

@WyriHaximus
Copy link
Member Author

Could anyone else 👎 or 👍 this so it can be merged and tagged? Could use that :)

@clue
Copy link
Member

clue commented Jul 29, 2016

Let's get this in! :shipit:

@clue clue merged commit 5fdf770 into reactphp:master Jul 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants