Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer polluting the cache with empty results from keys-only queries. #3

Merged
merged 1 commit into from
Apr 2, 2013

Conversation

xStrom
Copy link
Collaborator

@xStrom xStrom commented Apr 2, 2013

The old code cached empty results when a keys-only query was made.

Here's some basic code that demonstrates the problem:

g := goon.NewGoon(r)
q := datastore.NewQuery("BugCheck").KeysOnly()
var bcs []*BugCheck
es, _ := g.GetAll(q, &bcs)

e, _ := g.NewEntityById("bug-check-1", 0, nil, &BugCheck{})
e, _ = g.Get(&BugCheck{}, e.Key)

if e.Src == nil {
    // Shouldn't be nil, but is because the keys-only query cached it as such
}

maddyblue added a commit that referenced this pull request Apr 2, 2013
No longer polluting the cache with empty results from keys-only queries.
@maddyblue maddyblue merged commit f3be7bd into maddyblue:master Apr 2, 2013
maddyblue pushed a commit that referenced this pull request Jan 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants