 # limitations under the License.
 
 ResourceProvider = ($http, $q, $gmStorage, $gmUrls, $model, config, $rootScope,
-                    $i18next, $filter, $log) ->
+                    $i18next, $filter, $log, $cacheFactory) ->
+    cache = $cacheFactory("httpCache", 512)
     service = {}
     headers = (diablePagination=true) ->
         data = {}


    service.getPriorities = (projectId, filters={}) ->
        parameters = _.extend({}, filters, {project:projectId})
        return queryMany("choices/priorities", parameters, {cache:true})

    service.createPriority = (form) ->
        return $model.create("choices/priorities", form)


    # Get a project
    service.getProject = (projectId) ->
        return queryOne("projects", projectId, {cache:cache})

    # Get a project stats
    service.getProjectStats = (projectId) ->
