Skip to content

Conversation

@dmitchell
Copy link
Contributor

STUD-1048

Note, this PR has the stuff I put into the hotfixes as I was monotonically building on those but they haven't been merged to master yet. If they get merged from release before this PR, I'll rebase this one.

So, you may want to just review the last commit as the others have been reviewed in PR 1902 and 1937.

@singingwolfboy @cahrens Please review or delegate (other potential reviewers include @chrisndodge @cpennington ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pythonic last ele mechanism. Not important.

Don Mitchell added 2 commits December 13, 2013 14:33
Conflicts:
	cms/djangoapps/auth/authz.py
@cahrens
Copy link

cahrens commented Dec 16, 2013

@chrisndodge Do you have time to review this? I'm don't necessarily think I am the best person....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the syntax for name__in?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

field__in = listvalues translates to a sql where field in listvalues Something @cpennington pointed out to me and correctly suggested we use.

@ghost ghost assigned singingwolfboy Dec 16, 2013
@chrisndodge
Copy link
Contributor

OK, there's quite a bit of stuff I'm unfamiliar with, but I understand enough to give it a +1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user.groups.remove(*user.groups.filter(name__in=groupnames))?

@dmitchell
Copy link
Contributor Author

@cpennington I configured a different cache and used the remove syntax. I assume this is ready to go now?

@e0d this looks for a cache named 'loc_cache' and if it doesn't find it uses 'default'. 'loc_cache' can be a simple local memory cache, imho, but could be a general memcache. I assume a local mem cache performs a lot better than a shared memcache.

@cpennington
Copy link
Contributor

@e0d @dmitchell If it's a local memory cache, then it's going to be important to get the arguments right: https://docs.djangoproject.com/en/1.4/topics/cache/#cache-arguments

In particular, MAX_ENTRIES is going to have to be large enough that we get benefit from the caching, and small enough that we don't use all the memory on the box.

dmitchell added a commit that referenced this pull request Dec 16, 2013
@dmitchell dmitchell merged commit 3cf7519 into master Dec 16, 2013
@dmitchell dmitchell deleted the dhm/loc_mapper_memoize branch December 16, 2013 18:34
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.

6 participants