When the cache is full and your code needs to use a prepared statement that is not in the cache, the least recently used prepared statement is removed from the cache and the new one is added.
The preparedStatementCacheSize option applies only to Java generation. If you generate Java runtime properties, the value you specify is assigned to the vgj.jdbc.pstmt.cache.size property.