aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
Diffstat (limited to 'cache')
-rw-r--r--cache/query.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cache/query.go b/cache/query.go
index 198adfc9..6ffa6510 100644
--- a/cache/query.go
+++ b/cache/query.go
@@ -12,9 +12,12 @@ type Query struct {
OrderDirection
}
-// Return an identity query
+// Return an identity query with default sorting (creation-desc)
func NewQuery() *Query {
- return &Query{}
+ return &Query{
+ OrderBy: OrderByCreation,
+ OrderDirection: OrderDescending,
+ }
}
// ParseQuery parse a query DSL