-
Notifications
You must be signed in to change notification settings - Fork 81
Description
My models are described and stored in Redis. It allows me to have a versatile backend and change my models on the fly.
To do so I extend Node on the fly, define my properties and return a proxy based on this temporary model. I do this only when somebody creates or updates a node.
The problem is, each time a create a proxy, the proxy builder makes a get_or_create index. Is there a way to prevent this behavior if the index has already be ensured ? Mongodb drivers do this with ensureIndex. The first time it shoots a request and then do only one request each X minutes.
Second question, is it safe to create proxies on the fly (I use graph.build_proxy), do you keep references somewhere ? I don't want to mess up with garbage collection ...
If you have a better suggestion, please let me know :)
- Emmanuel