How to use the falcor/support/positions.cache function in falcor

To help you get started, we’ve selected a few falcor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Netflix / falcor / lib / invalidate / invalidate-path-sets-as-json-graph.js View on Github external
var clone = require("falcor/support/clone-dense-json");
var array_clone = require("falcor/support/array-clone");

var options = require("falcor/support/options");
var walk_path_set = require("falcor/walk/walk-path-set-soft-link");

var is_object = require("falcor/support/is-object");

var get_valid_key = require("falcor/support/get-valid-key");
var update_graph = require("falcor/support/update-graph");
var invalidate_node = require("falcor/support/invalidate-node");
var clone_success = require("falcor/support/set-successful-paths");
var collect = require("falcor/lru/collect");

var positions = require("falcor/support/positions");
var _cache = positions.cache;
var _message = positions.message;
var _jsong = positions.jsong;
var _json = positions.json;

function invalidate_path_sets_as_json_graph(model, pathsets, values) {

    var roots = options([], model);
    var index = -1;
    var count = pathsets.length;
    var nodes = roots.nodes;
    var parents = array_clone(nodes);
    var requested = [];
    var optimized = [];
    var json = values[0];

    roots[_cache] = roots.root;
github Netflix / falcor / lib / invalidate / invalidate-path-sets-as-json-values.js View on Github external
var array_clone = require("falcor/support/array-clone");
var array_slice = require("falcor/support/array-slice");

var options = require("falcor/support/options");
var walk_path_set = require("falcor/walk/walk-path-set");

var is_object = require("falcor/support/is-object");

var get_valid_key = require("falcor/support/get-valid-key");
var update_graph = require("falcor/support/update-graph");
var invalidate_node = require("falcor/support/invalidate-node");

var collect = require("falcor/lru/collect");

var positions = require("falcor/support/positions");
var _cache = positions.cache;
var _message = positions.message;
var _jsong = positions.jsong;
var _json = positions.json;

function invalidate_path_sets_as_json_values(model, pathsets, onNext) {

    var roots = options([], model);
    var index = -1;
    var count = pathsets.length;
    var nodes = roots.nodes;
    var parents = array_clone(nodes);
    var requested = [];
    var optimized = [];

    roots[_cache] = roots.root;
    roots.onNext = onNext;