Skip to content

memcache won't cache codejail executions #1

@nedbat

Description

@nedbat

Hi Ned,

Something I ran into while setting up the load test:

Django's memcache backend seems to accept only certain keys. When I try using safe_exec with spaces or newlines, it raises "MemcachedKeyCharacterError: Control characters not allowed" which causes LoncapaProblem to re-raise the exception in init()

For example, this key causes the exception:
"safe_exec -613400940 \ndef check_func(expect, answer_given):\n return {'ok': answer_given == expect, 'msg': 'Message text'}\n [(u'seed', -613400940)]"

The tests we have for capa mock out the cache, and the local dev settings don't use memcache, which is why they've been passing.

-- Will

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions