Re: Caching the PreparedStatement (Java driver)

2015-05-15 Thread Tyler Hobbs
On Fri, May 15, 2015 at 12:02 PM, Ajay wrote: > > But I am also not sure of what happens when a cached prepared statement is > executed after cassandra nodes restart. Does the server prepared statements > cache is persisted or in memory?. For now, it's just in memory, so they are lost when the

Re: Caching the PreparedStatement (Java driver)

2015-05-15 Thread Ajay
Hi Joseph, Java driver currently caches the prepared statements but using a weak reference i.e the cache will hold it as long the client code uses it. So in turn means that we need to cache the same. But I am also not sure of what happens when a cached prepared statement is executed after cassand

Re: Caching the PreparedStatement (Java driver)

2015-02-28 Thread Ajay
Hi, My earlier question was whether it is safe to cache PreparedStatement (using Java driver) in the client side for which I got it confirmed by Olivier. Now the question is do we really need to cache the PreparedStatement in the client side?. Lets take a scenario as below: 1) Client fires a RE

Caching the PreparedStatement (Java driver)

2015-02-27 Thread Ajay
Hi, We are building REST APIs for Cassandra using the Cassandra Java Driver. So as per the below guidlines from the documentation, we are caching the Cluster instance (per cluster) and the Session instance (per keyspace) as they are multi thread safe. http://www.datastax.com/documentation/develop