graphqlite icon indicating copy to clipboard operation
graphqlite copied to clipboard

mapTTL seems to be not set by default and can't be configured

Open Lappihuan opened this issue 3 years ago • 3 comments

mapTTL seems to be intended to controll the Cache of TypeMappers.

It is implemented up to the FactoryContext but the SchemaFactory is not exposing it, nor setting it, which leaves it null for ever. From my understanding this could potentially be a performance boost on each request.

Is this intentional or an oversight?

Lappihuan avatar Jun 13 '21 11:06 Lappihuan

Wouldn't a null TTL value simply not expire the cache? How would specifying a TTL value, which expires the cache, improve performance?

oojacoboo avatar Jun 13 '21 21:06 oojacoboo

I'm not sure, but that might be the case that a null value will cache forever. It seems odd that the globTTL is always set but the mapTTL not.

Lappihuan avatar Jun 13 '21 21:06 Lappihuan

I don't have an issue with, or see an issue, with exposing this property if you'd like to submit a PR. Maybe @moufmouf can chime in on this.

oojacoboo avatar Jun 13 '21 21:06 oojacoboo