Docstring
Extract function from jobs to cached apps
Tests for new function