Cache Service
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
ক্যাশে
এই পরিষেবাটি একটি স্ক্রিপ্টকে সাময়িকভাবে ফলাফল ক্যাশে করার অনুমতি দেয় যা আনয়ন/গণনা করতে সময় নেয়। সর্বজনীন ক্যাশেগুলি এমন জিনিসগুলির জন্য যা কোন ব্যবহারকারী আপনার স্ক্রিপ্ট অ্যাক্সেস করছে তার উপর নির্ভর করে না। ব্যক্তিগত ক্যাশেগুলি এমন জিনিসগুলির জন্য যা ব্যবহারকারী-নির্দিষ্ট, যেমন সেটিংস বা সাম্প্রতিক কার্যকলাপ৷
ক্লাস
নাম | সংক্ষিপ্ত বিবরণ |
---|
Cache | একটি নির্দিষ্ট ক্যাশে একটি রেফারেন্স. |
Cache Service | ক্যাশে পরিষেবা আপনাকে ডেটার স্বল্পমেয়াদী স্টোরেজের জন্য একটি ক্যাশে অ্যাক্সেস করতে দেয়। |
পদ্ধতি
পদ্ধতি | রিটার্ন টাইপ | সংক্ষিপ্ত বিবরণ |
---|
get(key) | String | প্রদত্ত কীটির জন্য ক্যাশে করা মান পায়, অথবা যদি কোনোটি না পাওয়া যায় তাহলে null । |
get All(keys) | Object | কীগুলির অ্যারের জন্য ক্যাশে পাওয়া সমস্ত কী/মান জোড়া রয়েছে এমন একটি জাভাস্ক্রিপ্ট অবজেক্ট প্রদান করে। |
put(key, value) | void | ক্যাশে একটি কী/মান জোড়া যোগ করে। |
put(key, value, expirationInSeconds) | void | মেয়াদ শেষ হওয়ার সময় (সেকেন্ডে) সহ ক্যাশে একটি কী/মান জোড়া যোগ করে। |
put All(values) | void | ক্যাশে কী/মান জোড়ার একটি সেট যোগ করে। |
put All(values, expirationInSeconds) | void | মেয়াদ শেষ হওয়ার সময় (সেকেন্ডে) সহ ক্যাশে কী/মান জোড়ার একটি সেট যোগ করে। |
remove(key) | void | প্রদত্ত কী ব্যবহার করে ক্যাশে থেকে একটি এন্ট্রি সরিয়ে দেয়। |
remove All(keys) | void | ক্যাশে থেকে এন্ট্রিগুলির একটি সেট সরিয়ে দেয়। |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eApps Script Cache service provides temporary storage for script results, improving performance by avoiding redundant computations or fetches.\u003c/p\u003e\n"],["\u003cp\u003eTwo types of caches are available: public caches for shared data and private caches for user-specific information.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCacheService\u003c/code\u003e offers methods to access document, script, or user-scoped caches, while the \u003ccode\u003eCache\u003c/code\u003e class provides methods for data manipulation within a cache instance, like adding, retrieving, and removing entries.\u003c/p\u003e\n"],["\u003cp\u003eCache entries can have optional expiration times, allowing for automatic removal after a specified duration.\u003c/p\u003e\n"]]],[],null,["# Cache Service\n\nCache\n\nThis service allows a script to temporarily cache results that take time to\nfetch/compute. Public caches are for things that are not dependent on which user\nis accessing your script. Private caches are for things which are user-specific,\nlike settings or recent activity.\n\nClasses\n-------\n\n| Name | Brief description |\n|------------------------------------------------------------|---------------------------------------------------------------------------|\n| [Cache](/apps-script/reference/cache/cache) | A reference to a particular cache. |\n| [CacheService](/apps-script/reference/cache/cache-service) | CacheService allows you to access a cache for short term storage of data. |\n\n[Cache](/apps-script/reference/cache/cache)\n-------------------------------------------\n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------------------------------------------------------------|-------------|-----------------------------------------------------------------------------------------------------|\n| [get(key)](/apps-script/reference/cache/cache#get(String)) | `String` | Gets the cached value for the given key, or `null` if none is found. |\n| [getAll(keys)](/apps-script/reference/cache/cache#getAll(String)) | `Object` | Returns a JavaScript Object containing all key/value pairs found in the cache for an array of keys. |\n| [put(key, value)](/apps-script/reference/cache/cache#put(String,String)) | `void` | Adds a key/value pair to the cache. |\n| [put(key, value, expirationInSeconds)](/apps-script/reference/cache/cache#put(String,String,Integer)) | `void` | Adds a key/value pair to the cache, with an expiration time (in seconds). |\n| [putAll(values)](/apps-script/reference/cache/cache#putAll(Object)) | `void` | Adds a set of key/value pairs to the cache. |\n| [putAll(values, expirationInSeconds)](/apps-script/reference/cache/cache#putAll(Object,Integer)) | `void` | Adds a set of key/value pairs to the cache, with an expiration time (in seconds). |\n| [remove(key)](/apps-script/reference/cache/cache#remove(String)) | `void` | Removes an entry from the cache using the given key. |\n| [removeAll(keys)](/apps-script/reference/cache/cache#removeAll(String)) | `void` | Removes a set of entries from the cache. |\n\n[CacheService](/apps-script/reference/cache/cache-service)\n----------------------------------------------------------\n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------------------------------------------|---------------------------------------------|--------------------------------------------------------------------|\n| [getDocumentCache()](/apps-script/reference/cache/cache-service#getDocumentCache()) | [Cache](/apps-script/reference/cache/cache) | Gets the cache instance scoped to the current document and script. |\n| [getScriptCache()](/apps-script/reference/cache/cache-service#getScriptCache()) | [Cache](/apps-script/reference/cache/cache) | Gets the cache instance scoped to the script. |\n| [getUserCache()](/apps-script/reference/cache/cache-service#getUserCache()) | [Cache](/apps-script/reference/cache/cache) | Gets the cache instance scoped to the current user and script. |"]]