![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
The library makes it easy to use the Appcelerator Cache API Service. This library is meant to act as a drop-in replacement for the Node Redis Client Library.
npm install appc-cache --save
You must first include the library and create an instance. At a minimum, you must pass in the key
and secret
values for constructing the client.
var Cache = require('appc-cache'),
cache = new Cache({
key: 'MY_KEY',
secret: 'MY_SECRET'
});
Once you have created the client instance, you can use it. This library is (generally) compatible with the Redis API.
cache.set('key', 'value', function (err) {
// set the value
});
cache.get('key', function (err, value) {
console.log('cached value is', value);
});
This library emulates the same API as the redis client. For example:
var redis = require('appc-cache');
var client = redis.createClient({
key: 'key'
});
client.auth('secret');
var multi = client.multi();
multi.echo('OK', redis.print);
multi.exec();
This library provides an Express compatible session store implementation. Example usage:
var app = express(),
session = require('express-session'),
Cache = require('appc-cache'),
CacheStore = Cache.createSessionStore(session),
options = {
key: 'mykey',
secret: 'mysecret',
ttl: 2000
};
app.use(session({
store: new CacheStore(options),
secret: 'keyboard cat',
resave: false,
saveUninitialized: false
}));
This library supports distributed locks. With a distributed lock, only one client can acquire a named lock at a time for a specified duration.
cache.lock('my.lock', 10000, function (err, lock) {
cache.unlock(lock);
});
You can extend the lock with the extend
method. For example:
cache.lock('my.lock', 10000, function (err, lock) {
// extend the lock another 10 sec
cache.extend(lock, 10000);
cache.unlock(lock);
});
There are a number of APIs that are not support or not allowed. For example, this library does not support shutdown
. For a full list of commands, see the file lib/blacklist.js
.
You can run the unit tests by setting the value of the following environment variables APPC_TEST_KEY
and APPC_TEST_SECRET
to the values to use for caching. For example:
APPC_TEST_KEY=kkkkkkkkkkkkkkkkkkkkkkkkk APPC_TEST_SECRET=ssssssssssssssssssssssss grunt
The library is Confidential and Proprietary to Appcelerator, Inc. and licensed under the Appcelerator Software License Agreement. Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved.
FAQs
AppC cache client library
The npm package appc-cache receives a total of 2 weekly downloads. As such, appc-cache popularity was classified as not popular.
We found that appc-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.