Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cannot Cache the data for js-data actions #366

Open
Labels
@VenkatRamReddyK

Description

@VenkatRamReddyK

Api Endpoint: : /test/users/:userId/settings

I need to useCaching withjs-dataactions.

$provide.factory('UserSettings', function (DS, $q, $log) {      function handleResponse( response ) {        var Resource = DS.definitions.userSettings;        response = Resource.deserialize( Resource, response );        return response;      };      var _userSettings = DS.defineResource({        basePath: '/test',        endpoint: '/users',        name: 'userSettings',        cacheResponse: true,        bypassCache: false,        actions: {          getSettings: {            method: 'GET',            pathname: 'settings',            response: handleResponse          },          saveSettings: {            method: 'PUT',            pathname: 'settings',            response: handleResponse          }        },        deserialize: function ( resourceConfig, data ) {          if ( data.config.method === 'PUT' || data.config.method === 'GET' ) {            return data.data;          }          else if ( data.config.method === 'DELETE' || data.config.method === 'POST' ) {          }        }      });      return _userSettings;    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp