-
-
Notifications
You must be signed in to change notification settings - Fork 572
Open
Labels
Description
Hi,
I'm trying to use typeorm cache using the crud decorator:
@Crud({
model: {
type: Order
},
query: {
join: {
catalog: {
eager: true
},
products: {
eager: true
}
},
cache: 10000
}
})
And simple typeorm configuration:
{
type: 'mysql',
...
cache: true
}
but no cache is created.
Exploring typeorm-crud.service.js
code, I've noticed that cache is implemented like this (line 179):
builder.cache(builder.getQueryAndParameters(), options.query.cache);
but in this way the whole SQL query is used as identifier, but its db field is a VARCHAR(255), and so no record is created inside cache's table
cteeth, erbattista, danielwhatmuff, dev-infinitec, elvinmezacb and 3 more