Navigation Menu

Skip to content

Commit

Permalink
Update README with caching example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jadell committed Jul 17, 2011
1 parent f13a556 commit 8cb5cfb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Expand Up @@ -63,6 +63,12 @@ Examples
echo $node->getProperty('name');
}
}

### Setting a cache
// By default, the caching back-end is set to `Cache\Null`.
// New cache back-ends can be created by implementing the `Cache` interface.
$client->setCache(new Cache\Variable());


API
---
Expand All @@ -80,6 +86,9 @@ Create a new Neo4j client.
getLastError() : integer
Return any error code from the last operation. Returns null if no error occurred.

setCache(Cache $cache)
Set the caching mechanism to use. There are two built-in cache wrappers that can be used: `Null` which does not cache anything (this is the default if no cache is set); and `Variable` which holds all cached values in memory for the length of the process or request. New cache back-ends can be created by extending the `Cache` interface.

### Node

__construct(Client $client)
Expand Down Expand Up @@ -364,6 +373,5 @@ Set the current uniqueness filter. One of `Traversal::UniquenessNone`, `Travers
To Do
-----
* Batch/transaction support? (experimental)
* Caching

* Gremlin support

0 comments on commit 8cb5cfb

Please sign in to comment.