neoxygen / neo4j-neoclient

Simple PHP HttpClient for the Neo4j ReST API with Multi DB Support
MIT License
121 stars 138 forks source link

clear cache? #67

Closed flip111 closed 8 years ago

flip111 commented 8 years ago

I'm using the symfony 2 framework and there is a clear:cache command available there If there is a way within this library to clear the cached container, i will be able to hook this up by calling this method

ikwattro commented 8 years ago

Good point, I will check for that.

ikwattro commented 8 years ago

@flip111 Rethinking of this.

How do you use the client inside Symfony2 ? As the containers are compatible, you should inject the Symfony container inside the client one. So the only cached container will be the symfony one.

You can take a look here on how I bundled the client with symfony :

https://github.com/graphaware/GithubNeo4j/tree/master/src/GraphAware/Neo4jBundle

flip111 commented 8 years ago

I use the static method on ClientBuilder and then specify the cache directory the same as where symfony is putting it's cache. I'm not sure what do you mean with this

inject the Symfony container inside the client one

But yes i noticed the containers use the same technology ..

Perhaps we can put this bundle in it's own repository??

flip111 commented 8 years ago

A brief glance tells me it could be this line

https://github.com/graphaware/GithubNeo4j/blob/master/src/GraphAware/Neo4jBundle/DependencyInjection/GraphAwareNeo4jExtension.php#L25

passing the container off to the parent ... however i never did this myself so i'm not sure. The neo4jclient container would then be part of the symfony container ..

ikwattro commented 8 years ago

No it will not be part, as the Container is passed the client will just wired all the services, that's it. So it will be the same container.

A bundle will be great yes, but after 4.0, because in 4.0 the container will disappear, so a lot of breaking changes, but good breaking changes, especially a uniform Result format definition :)