Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

[ZF3] Split out resource factories / manager #24

Open
ghost opened this issue Oct 25, 2015 · 2 comments
Open

[ZF3] Split out resource factories / manager #24

ghost opened this issue Oct 25, 2015 · 2 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Oct 25, 2015

One of the most confusion part of the current cache component is the usage of resource manager.
The resource managers are used to instantiate resources (like an instance of Memcache/d) and to share the same resources over different instances of the fitting interface. Sharing resource is required to not open a new resource (like a network connection) to the same thing only to be able to use different storage instances with different options (like namespace / TTL).

In my opinion the cache adapters should not contain so much complexity and I would like to remove this functionality and simply let inject the resources into the adapters if required.

But where move this functionality to?

  • Should this be part of another component like zend-servicemanager?
  • Should this be done completely by the user?

Related:

@weierophinney @ezimuel @Maks3w @Ocramius Thoughts?

@snowwolf007cn
Copy link

I used to think that db module is a good choice. but db use a table gateway model to process with ORM, it's much more RDBMS oriented.
since NoSQL is widely used today, I think it's a better idea to have a new design on data persistence and data process. Something like POJO implements hydrator interface with annotation to define the data source seems a good choice for me to unified persistence and cache operation. I suggest a data source manager module to do all this.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-cache; a new issue has been opened at laminas/laminas-cache#13.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants